matlab中如何编写一个GUI的按钮读取一副图像,功能如下:点击按钮,弹出...答:};选择文件 [filename, pathname] = uigetfile( filter, '打开...');if isequal(filename,0) | isequal(pathname,0), return, end 读入图像并显示 [X, map] = imread([pathname filename]);colormap(map)image(X)设置坐标系为适合显示图像的方式 axis image set(gca, 'vis', 'off')
matlab的gui,想通过一个按钮,在axes中打开一幅图片,该怎么写代码?_百 ...答:按键下写如下代码 打开文件对话框 [filename,pathname]=uigetfile({ ...'*.*','All Files(*.*)';},...'选择文件');if isequal([filename,pathname],[0,0])return else 读取图片 pic = fullfile(pathname,filename);b = imread(pic);imshow(b);end ...