📄 fm_simsave.m
字号:
function fm_simsave(varargin)% FM_SIMSAVE attempts to save the current Simulink model to% Simulink 3 (R11) or, if it is not possible, to the% oldest supported Simulink release.%% This functions calls UIGETFILE to chose a Simulink% model. At the end of the procedure, the original file% will subsituted with the new one.%%Author: Federico Milano%Date: 07-Aug-2003%Version: 1.0.0%%E-mail: Federico.Milano@uclm.es%Web-site: http://www.uclm.es/area/gsee/Web/Federico%% Copyright (C) 2002-2008 Federico Milanoglobal Path Settingsif exist('simulink') ~= 5 fm_choice('Simulink is not available on this system',2); returnendif Settings.hostver < 7 fm_choice('This function runs only under Matlab 7.x or newer',2) returnendswitch nargin case 0, [filename, pathname] = uigetfile('*.mdl', ... 'Chose Simulink Model...'); case 1, if ~strcmp(varargin{1},'all'), return, end foldername = uigetdir(Path.local); a = dir([foldername,filesep,'*.mdl']); names = {a.name}; for i = 1:length(names) fm_simsave(names{i},foldername); end return otherwise, filename = varargin{1}; pathname = varargin{2};endif isequal(pathname,0), return, endmodelname = strrep(filename,'.mdl','');currentpath = pwd;cd(pathname)fm_disp(['Model ', modelname,' will be saved in Simulink 5.1 (R13SP1) format.'])load_system(modelname);save_system(modelname,modelname,'','R13SP1');cd(currentpath)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -