www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgpreclookupfix/get.m
function Value = get(Prec, Property) %GET Get properties of a cgprecpolyfix object. % % VALUE = GET(LOOKUPFIXPREC, PROP) returns the specified property PROP of % the cgpreclookupfix object LOOKUPFIXPREC. % % VALUE = GET(LOOKUPFIXPREC) returns all available properties of the % cgpreclookupfix object. % % See also CGPRECLOOKUPFIX. % Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin==1 % Return all available properties in a cell array Value = get(Prec.cgprecfix); Value.TablePhysData = Prec.TablePhysData; Value.TableHWData = Prec.TableHWData; Value.PhysRange = ... [max(min(Prec.PhysRange), min(Prec.TablePhysData)), ... min(max(Prec.PhysRange), max(Prec.TablePhysData))]; return end switch lower(Property) case 'tablephysdata' % Return TablePhysData Value = Prec.TablePhysData; case 'tablehwdata' % Return TableHWData Value = Prec.TableHWData; case 'physrange' Value = Prec.PhysRange;... case 'hwrange' % Overload the fixed point hardware range to also limit it to the % TablePhysData (since there is no extrapolation) Value = get(Prec.cgprecfix, Property); Value = [max(min(Value), min(Prec.TablePhysData)), ... min(max(Value), max(Prec.TablePhysData))]; otherwise Value = get(Prec.cgprecfix, Property); end