About sampling rate of a signal
11 views (last 30 days)
Show older comments
Hari Ijjada
on 21 Sep 2019
Commented: Hari Ijjada
on 21 Sep 2019
sampling rate =12500
no of samples =25000...
i want to increase the sampling rate by factor of 2 means 12500 to 25000...How can i do this without changing the number of sample ? is it possible to change the sampling rate of signal with out chaning the no of samples..?
0 Comments
Accepted Answer
Walter Roberson
on 21 Sep 2019
You can just start using the data as if it were the higher sampling rate. However, by doing so you raise the frequency of the samples; in the case of audio, the effect would as if the original source had been one octave higher than it really was. It is valid, for example, to do
[samples, Fs] = audioread('YourFile.wav');
sound(samples, 2*Fs) %will play at double the original pitch
Somehow I suspect that is not your intention. I suspect that for your purpose the answer is NO.
Consider: 25000 samples at 12500 samples per second is 2 seconds. If you double the sampling rate without changing the number of samples, then you would be wanting 25000 samples/s and you would still have 25000 samples. Clearly 25000 samples at 25000 samples/s can only take 1 seconds, not the 2 seconds of the original. If you wanted 2 seconds of output at 25000 samples per second, you would need 50000 samples, not the original 25000 samples.
More Answers (0)
See Also
Categories
Find more on Simulation, Tuning, and Visualization 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!