downsamplex#
function [x_ds] = downsamplex(x, RetainRatio)
Description#
Downsample x data and retain given ratio
Inputs#
- x
x data
- RetainRatio=0.5;
- Define percentage of data to retain, value between 0 and 1Example: RetainRatio=0.8; means 80% of data are retained
Outputs#
- x_ds
Downsample x data
Examples#
x(:,1)=10.*rand(1000,1);
[x_ds]=downsamplex(x, 0.7);
xgrid=(-90-(-91)).*rand(1000,500)+(-91);
[x_ds]=downsamplex(xgrid, 0.7);