save_as.m

来自「关于混沌系统的李氏指数计算等混沌系统中重要参数计算的代码」· M 代码 · 共 41 行

M
41
字号
% ------------------------------------------------------------
% Callback for Open menu - displays an open dialog
% ------------------------------------------------------------
function varargout = Save_As(h, eventdata, handles, varargin)
% Use UIGETFILE to allow for the selection of a dynamical system.
global matdspath;
global DS;


cd(matdspath.systems);
[filename, pathname] = uiputfile(...
	{'*.mds', 'MATDS-Files (*.mds)'}, ...
	'Select dynamical system');
% If "Cancel" is selected then return
if ~isequal([filename,pathname],[0,0])
% Otherwise construct the fullfilename and Check and write the file.
	File = fullfile(pathname,filename);
        uu=findstr(File,'.mds');
        if isempty(uu)==0
           File=File(1:(uu( length(uu) )-1) );
        end;
% if the MAT-file is not valid, do not save the name
        errcode = 0;
        tempi=exist(File);
        if (tempi>2) & (tempi<7)
           button = questdlg(['Warning! File ' File ' exist!'],...
               'Replace it?','Yes','No','No');
           if strcmp(button,'No')
              errcode = 1;
           end;
        end;

        if errcode == 0
           Check_And_Write(File);
        end;

end
cd(matdspath.main);


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?