www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@abstractresponse/Export.m
function M= Export(R,Format,varargin) %EXPORT Export model from MBC project. % % EXPORTED_MODEL = EXPORT( RESPONSE ) exports the model as to MATLAB. % % EXPORTED_MODEL = EXPORT( RESPONSE, FORMAT ) exports the model in the % specified format. FORMAT can be 'MATLAB' or 'Simulink'. % % See also mbcmodel.model.Export % Copyright 2004-2011 The MathWorks, Inc. % . if nargin < 2 Format = 'MATLAB'; end switch lower(Format) case 'matlab' M= getBestExportModel(R.Object); case 'simulink' M= SimulinkModel(R.Object); otherwise error(message('mbc:mbcmodel:abstractresponse:InvalidArgument')); end