声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1049|回复: 1

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

[复制链接]
发表于 2008-4-19 16:44 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
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>
[x,fval,exitflag,output,lambda]=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 编辑 ]
回复
分享到:

使用道具 举报

发表于 2008-4-21 20:29 | 显示全部楼层
原帖由 ykpdesky 于 2008-4-19 16:44 发表
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 命令的要求
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-12 05:32 , Processed in 0.074204 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表