User`s guide

1 Data Processing
Note resample uses the Signal Processing Toolbox™ command, when this
toolbox is installed on your computer. If this toolbox is not installed, use
idresamp instead. idresamp only lets you specify the lter order, whereas
resample also lets you specify lter coefcients and the design parameters
of the Kaiser window.
To create a new idd ata object datar by resampling data,usethefollowing
syntax:
datar = resample(data,P,Q,filter_order)
In this case, P and Q are integers that specify the n ew sampling interval: the
new sampling interval is
Q/P times the orig inal one. Y ou can also s pecify the
order of the resampling lter as a fourth argum ent
filter_order,whichis
an integer (default is
10). For detailed information about resample,seethe
corresponding reference page.
For example,
resample(data,1,Q) re sults in decimat ion with the sampling
interval modied by a factor
Q.
The next example shows how you can increase the sampling rate by a factor of
1.5 and compare the signals:
plot(u)
ur = resample(u,3,2);
plot(u,ur)
When the Signal Processing Toolbox product is not installed, using resample
calls idresamp instead.
idresamp uses the following syntax:
datar = idresamp(data,R,filter_order)
In this case, R=Q/P, which means that data is interpolated by a factor P and
then decimated by a factor
Q. To learn more about idresamp,typehelp
idresamp
.
1-102