GUI存储文件uiputfile matlab

来源:互联网 发布:tensorflow 离线安装 编辑:程序博客网 时间:2024/05/21 11:15
[filename, pathname]=...
     uiputfile({'*.jpg';'*.bmp';'*.gif'},'choose image pathway');
%combination and file name
str = [pathname filename];
if (filename~=0)
imwrite(seg,str);
else
    return

end



  [filename, pathname, filterindex] = uiputfile( ...
       {'*.m;*.fig;*.mat;*.mdl', 'All MATLAB Files (*.m, *.fig, *.mat, *.mdl)';
        '*.m',  'MATLAB Code (*.m)'; ...
        '*.fig','Figures (*.fig)'; ...
        '*.mat','MAT-files (*.mat)'; ...
        '*.mdl','Models (*.mdl)'; ...
        '*.*',  'All Files (*.*)'}, ...
        'Save as');

存储格式在一行和多行。