How can i use "resample" command in matlab to change bandwidth of a measured signal ?
6 views (last 30 days)
Show older comments
Hi everyone! Now, i'm reading a book "Noise and vibration analysis" by Anders Brandt. And in this book, the author wrote that we can change bandwith of a measured signal using resample command. And of course, have a code for implementation, see below:
N=1000; % Number of samples to start with
x=randn(N,1); % Gaussian noise, oversampling ratio is 2
x=resample(x,5,1); % Resample to 10 times oversampling
x25=x(1:4:end); % Oversampling ratio of x25 is 2.5
xr=resample(x25,4,1); % oversampling ratio of xr is 10
% Plot ’original’ data x, and the resampled xr
Actually, i don't understand why this code can change bandwith of a measured signal ? Who can explain to me? Thank you so much.
Rik on 31 Oct 2017
Signal processing is not my field either, so I might be wrong. As I understand it, the sampling frequency determines the bandwidth of your data (this is tied to the Nyquist criterion as well). So by changing the sampling rate, by definition the bandwidth is changed.
I might be cheating (I had a few classes in signal processing), but I would say the examples in the doc are illuminating enough what the function does. And then it is just understanding how to interpret concepts like bandwidth and sampling frequency, where Wikipedia should help out.
PS just in case: I don't mean to sound condescending, I just want to give some advice. If anything is unclear, just leave a comment, other contributors that are better at signal processing than me are likely to check in.
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!