有关matlab中Gui的问题
需要通过建立一个界面去修改程序里面的参数,确定后用matlab仿真出图形,是不是只需要加一句话啊,但我加上后怎么图形不出来呢?所加句子:Age=str2num(get(h...
需要通过建立一个界面去修改程序里面的参数,确定后用matlab仿真出图形,是不是只需要加一句话啊,但我加上后怎么图形不出来呢?
所加句子:Age=str2num(get(handles.edit1,'string'));
出现的问题:
??? Error using ==> input
Not enough input arguments.
Error in ==> canshu>pushbutton1_Callback at 84
if (isempty(input))
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> canshu at 44
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
有高手可以帮助解答一下吗,多谢了 展开
所加句子:Age=str2num(get(handles.edit1,'string'));
出现的问题:
??? Error using ==> input
Not enough input arguments.
Error in ==> canshu>pushbutton1_Callback at 84
if (isempty(input))
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> canshu at 44
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
有高手可以帮助解答一下吗,多谢了 展开
展开全部
尝试使用这个代码来实现:
[filename pathname]=uiputfile({'*.jpg','jpg file(*.jpg)');
str = [pathname filename];
strBefore = str(1:end-4);
strEx = str(end-3 : end);
figure('visible', 'off');
strcmp(strEx, '.jpg')
fullName = [strBefore,'.jpg'];
h=get(handles.axes1,'children');
figure('visible','off');
axes;
copyobj(h,gca)
print(gcf,'-dmeta',fullName)
[filename pathname]=uiputfile({'*.jpg','jpg file(*.jpg)');
str = [pathname filename];
strBefore = str(1:end-4);
strEx = str(end-3 : end);
figure('visible', 'off');
strcmp(strEx, '.jpg')
fullName = [strBefore,'.jpg'];
h=get(handles.axes1,'children');
figure('visible','off');
axes;
copyobj(h,gca)
print(gcf,'-dmeta',fullName)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询