sens2var
Extract data from a sensor structure.
Syntax
[X,fs] = sens2var(Sx) % Matlab & Octave regularly sampled data % or [X,T] = sens2var(Sx) % Matlab & Octave irregularly sampled data % or [X,Y,fs] = sens2var(Sx,Sy); % Matlab & Octave with two variables of regularly sampled data % or [X,Y,T] = sens2var(Sx,Sy); % Matlab irregularly with two variables of irregularly sampled data #R to do
Description
Extract data from a sensor structure. If called with two variables, the function checks for compatibility (i.e., same length and sampling). The function can also be called with a trailing string 'regular' to check if the sensor structures are regularly sampled. If not, X will be returned empty.
Inputs
Input var | Description | Default |
---|---|---|
Sx, Sy | Sensor data structures. Sx, Sy must be sensor structures. If not X will be returned empty. | N/A |
r | Trailing string variable 'regular', to force the function to check if the sensor data are regularly sampled. | N/A |
Outputs
Output var | Description | Units |
---|---|---|
X,Y | are vectors or matrices of sensor data. These are in the same units and frame as stored in the input sensor structures. | N/A |
fs | is the sampling rate of the sensor data in Hz (samples per second). | N/A |
T | is the time in seconds of each measurement in data for irregularly sampled data. The time reference (i.e., the 0 time) is with respect to the start time of the data in the sensor structure. | N/A |
Example
Matlab & Octave
loadnc('testset3') [pca_dur,pca_time] = sens2var(PCA);
R
# to do
About
bugs@animaltags.org Last modified: 22 July 2017