www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localmod/get.m
function [Value,Found]=get(m,Property) %GET get localmod properties % Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc. Found=true; if nargin==1 % list of available properties Value= {'values','evaluationpoints', 'features',... 'feat.func','feat.disp','feat.name','feat.index',... 'delg','datumtype','IsDatum'}'; else switch lower(Property) case 'values' Value= m.Values; case 'evaluationpoints' Value = cell(size(m.Values,1),1); for i=1:length(Value) if ~isempty(strfind(m.Type( i ).Function,'.Value')) Value{i} = m.Values(i,:); end end case 'features' Value= m.Type; case 'feat.func' Value= {m.Type.Function}; case 'feat.disp' Value= {m.Type.Display}; case 'feat.name' Value= {m.Type.Name}; case 'feat.index' if isfield(m.Type,'index'); Value= [m.Type.index]; else Value= zeros(size(m.Values,1)); end case 'delg' Value= m.delG; case 'datumtype' Value= m.DatumType; case 'limits' Value= m.Limits; case 'isdatum' Value= [m.Type.IsDatum]; otherwise if nargout>1 Value = []; Found = false; else error(message('mbc:localmod:InvalidProperty', Property)) end end end