Resampling data


Resampling is the process of changing the sampling rate of data. Resample changes the sampling rate of the input AOs to the desired output sampling frequency. LTPDA resample overloads resample function of Matlab Signal Processing Toolbox for AOs.

    b = resample(a, pl)
  

With the following parameters:

Examples

1. Resampling a sequence of random data at original sampling rate of 1 Hz at an output sampling of 50 Hz.

    % create an AO of random data with fs = 10 Hz
    pl    = plist('tsfcn', 'randn(size(t))','fs',1,'yunits','m');  
    x     = ao(pl)
    pl_re = plist('fsout', 50)); 
    y     = resample(x, pl); % resample the input AO (x) to obtain the resampled output AO (y)
    iplot(x, y) % plot original and resampled data
  

Resample

1. Resampling a sequence of random data at original sampling rate of 10 Hz at an output sampling of 1 Hz with a filter defined by the user.

    % create an AO of random data with fs = 10 Hz
    pl = plist('tsfcn', 'randn(size(t))','fs',10,'yunits','m');  
    x  = ao(pl)	
% filter definition % create parameters list for the filter plfilter = plist('type','Win',specwin('Kaiser', 10, 150),'order',32,'fs',10,'fc',1); f = mfir(plfilter)
% resampling pl = plist('fsout', 1, 'filter',f)); define parameters list with fsout = 1 Hz and the defined filter y = resample(x, pl); % resample the input AO (x) to obtain the resampled output AO (y) iplot(x, y) % plot original and resampled data
Resample




©LTP Team