getPURPOSEGeneric get for sensors
SYNOPSISfunction out=get(S,field,varargin)
DESCRIPTIONGeneric get for sensors Retrives information about a sensor. The possible fields to retive are: - noise: The noise of the sensor. We assume it constant. - allReadings: The set of readings associated with the sensor. The nature of these readings depend on the type of sensor. - reading: A particular reading (index given as a second paramter). CROSS-REFERENCE INFORMATIONThis function calls:
SOURCE CODE0001 function out=get(S,field,varargin) 0002 % Generic get for sensors 0003 % 0004 % Retrives information about a sensor. 0005 % The possible fields to retive are: 0006 % - noise: The noise of the sensor. We assume it constant. 0007 % - allReadings: The set of readings associated with the sensor. 0008 % The nature of these readings depend on the type of sensor. 0009 % - reading: A particular reading (index given as a second paramter). 0010 0011 switch field 0012 case 'noise' 0013 out=S.noise; 0014 case 'allReadings' 0015 out=S.readings; 0016 case 'reading' 0017 out=S.readings{varargin{1}}; 0018 otherwise 0019 error('Unknow field in Sensor get'); 0020 end 0021 |