| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2688 人关注过本帖
标题:关于advisor中的一个m文件
只看楼主 加入收藏
yaoyaozhi
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2015-6-25
收藏
 问题点数:0 回复次数:2 
关于advisor中的一个m文件
将advisor运行在matlab环境中时,想通过界面打开advisor中的m 文件时,总报错说
未定义与 'cell' 类型的输入参数相对应的函数 'eq'。

出错 gui_current_str (line 20)
if value ==0
 
Error while evaluating UIControl Callback

原gui_current_str.m 文件如下
function str=gui_current_str(tag)

%str=gui_current_str(tag)  ADVISOR 2.0 function
%
%    This function is used to find the current string of a popupmenu or list
%    using the tag of the desired uicontrol.  tag is a string.
%    example str=gui_current_str('drivetrain') might return str='parallel'.
%


if nargin==0
   return
end
% find the object handle h of the object with the tag property tag.
h=findobj('tag',tag,'type','uicontrol');

%find the value (an integer) indicating which row of the string matrix the
%object is currently set on.
value=get(h,'value');
if value ==0                (报错的行)
   value=1;
end

%find the list of options for the object
stringmatrix=get(h,'string');

%select only the string from the list corresponding to the value
tempstr=char(stringmatrix(value,:));

%eliminate trailing blank spaces
tempstr=deblank(tempstr);
if isempty(tempstr)
   error('empty string');
else
   str=tempstr;
end
搜索更多相关主题的帖子: function current desired example matlab 
2015-06-25 16:35
zhy1320
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2017-9-6
收藏
得分:0 
请问你是怎么解决的?
2017-09-06 11:12
zhy1320
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2017-9-6
收藏
得分:0 
2017-09-06 12:19
快速回复:关于advisor中的一个m文件
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015468 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved