作业帮 > 综合 > 作业

急求Matlab语句含义!

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/05/04 14:52:49
急求Matlab语句含义!
在function open_Callback(hObject,eventdata,handles)
[name,path]=uigetfile('*.*','');
file=[path,name];
axes(handles.axes1);
x=imread(file); %读取图像
handles.img=x;
guidata(hObject,handles);
imshow(x); %显示图像
title('打开');
在function save_Callback(hObject,eventdata,handles)
[name,path]=uigetfile('*.*','');
file=[path,name];
axes(handles.axes1);
x=imread(file);
handles.img=x;
guidata(hObject,handles);
imshow(x);
imwrite(x,'new.jpg'); %保存图像
title('保存');
急求Matlab语句含义!
function open_Callback(hObject,eventdata,handles)
打开 open这个菜单
[name,path]=uigetfile('*.*','');
得到文件路径和名字
file=[path,name];
把路径和名字存下来
axes(handles.axes1);
坐标,内容是handles.axes1
x=imread(file); %读取图像
handles.img=x;
把图像发给handles.img,方便其他函数调用
guidata(hObject,handles);
把handles句柄更新.
imshow(x); %显示图像
title('打开');
加标题
后面的同上,类似.