?? optcom2.m
字號:
%非線性優化
clear;
%無約束優化fmins(需用M文件optfun1.m)
x=[-1.2,1];
[x,options]=fmins('optfun1',x);
x,options(8)
%約束優化constr (需用M文件optfun2.m)
x0=[20,10,16];
options(13)=1;
[x,options]=constr('optfun2',x0,options,...
[-inf,10,-inf]',[inf,20,inf]);
x,-options(8)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -