ykpdesky 发表于 2008-4-19 16:44

在运用fmincon工具箱的时候出现如下错误如何解决

Warning: Transfer function has complex coefficients.
> In <a href="error:C:\MATLAB7\toolbox\control\control\@tf\tf.m,197,1">tf.tf at 197</a>
In <a href="error:C:\MATLAB7\toolbox\control\control\@tf\mtimes.m,26,1">tf.mtimes at 26</a>
In <a href="error:C:\MATLAB7\work\opt_fun.m,143,1">opt_fun at 143</a>
In <a href="error:C:\MATLAB7\toolbox\optim\fmincon.m,338,1">fmincon at 338</a>
In <a href="error:C:\MATLAB7\work\opt_design.m,1031,1">opt_design>calculate_Callback at 1031</a>
In <a href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mainfcn at 75</a>
In <a href="error:C:\MATLAB7\work\opt_design.m,44,1">opt_design at 44</a>
??? Error using ==> fmincon
FMINCON cannot continue because user supplied objective function failed with the following error:
Function 'le' is not defined for values of class 'tf'.

Error in ==> <a href="error:C:\MATLAB7\work\opt_design.m,1031,1">opt_design>calculate_Callback at 1031</a>
=fmincon(@opt_fun,x0,A,b,[],[],[],[])

Error in ==> <a href="error:C:\MATLAB7\toolbox\matlab\uitools\gui_mainfcn.m,75,1">gui_mainfcn at 75</a>
      feval(varargin{:});

Error in ==> <a href="error:C:\MATLAB7\work\opt_design.m,44,1">opt_design at 44</a>
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.


Function 'le' is not defined for values of class 'tf'.这句没明白什么意思?我根本没有用到 le 这个函数呀!
请教高手!万分感谢!

[ 本帖最后由 eight 于 2008-4-21 20:29 编辑 ]

eight 发表于 2008-4-21 20:29

原帖由 ykpdesky 于 2008-4-19 16:44 发表 http://www.chinavib.com/forum/images/common/back.gif
Warning: Transfer function has complex coefficients.
> In tf.tf at 197
In tf.mtimes at 26
In opt_fun at 143
In fmincon at 338
In opt_design>calculate_Callback at 1031
In gui_mainfcn at ... fmincon 中用到数据比较, le 是指小于等于。请自行调试一下程序,看看输入的参数是否符合 fmincon 命令的要求
页: [1]
查看完整版本: 在运用fmincon工具箱的时候出现如下错误如何解决