www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgrelexpr/get.m
function out = get(relexp,property) %GET Standard get method % % Gets the properties of the cgrelexpr object. % % Usage: get(cgrelexpr) returns property list % get(cgrelexpr , 'property_name') returns value of property % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin == 1 out.Left = 'Left hand side argument'; out.Right = 'Right hand side argument'; out.Relation = 'Logical relation'; elseif nargin == 2 if ~ischar(property) error(message('mbc:cgrelexpr:InvalidArgument4')); end switch lower(property) case 'left' inputs = getinputs(relexp); out = inputs(1); case 'right' inputs = getinputs(relexp); out = inputs(2); case 'relation' out = relexp.rel; case 'type' warning(message('mbc:cgrelexpr:ObsoleteOption')); out = gettype(relexp); otherwise error(message('mbc:cgrelexpr:InvalidPropertyName', property)); end else error(message('mbc:cgrelexpr:InvalidArgument5')); end