Azzera filtri
Azzera filtri

How can i use "resample" command in matlab to change bandwidth of a measured signal ?

4 visualizzazioni (ultimi 30 giorni)
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
plot(1:50,x(1:50),ok,1:50,xr(1:50),+k)
legend(Original,Resampled)
xlabel(Sample Number)
Actually, i don't understand why this code can change bandwith of a measured signal ? Who can explain to me? Thank you so much.
  3 Commenti
Le Dung
Le Dung il 31 Ott 2017
Modificato: Le Dung il 31 Ott 2017
You mean: https://www.mathworks.com/help/signal/ref/resample.html
I am only a civil engineer. So, it is difficult to study on Digital signal processing. And, i understand only that, resample command will change sampling ratio (or sampling frequency)
Rik
Rik il 31 Ott 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.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by