Not enough inputs to inline function.
5 ビュー (過去 30 日間)
古いコメントを表示
when I deal with a control system simulation,that error always happens.I am a freshman.
Code:
pi=3.1415926;
x=0:0.001:100;
y1=exp(-pi.*x./((1-x.^2).^2))-0.3;
ks=fzero(f1,0.1);
y2=(pi./(x.*(1-(k).^2)))-0.1;
omiga=fzero(f2,[0 100]);
num=omiga*omiga;
den=[1 2*ks*omiga omiga*omiga];
step(num,den,1)
error :
>> autocon0303
Error using fzero (line 233)
FZERO cannot continue because user supplied inline object ==> f2 failed with the error below.
Not enough inputs to inline function.
Error in autocon0303 (line 6)
omiga=fzero(f2,[0 100]);
0 件のコメント
回答 (1 件)
Walter Roberson
2013 年 10 月 14 日
You do not show us any source for f1 or f2.
You calculate y1 and y2 as expressions, but you do not use them. You calculate ks but you do not use it.
Your expression for y2 involves the undefined variable "k".
Note: it would probably be better to not redefine "pi" as MATLAB has that built in.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Function Creation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!