Azzera filtri
Azzera filtri

How to sample a very small duration signal

1 visualizzazione (ultimi 30 giorni)
Poorva Limaye
Poorva Limaye il 20 Feb 2017
Risposto: Star Strider il 20 Feb 2017
I have a signal with time duration T= 20 micro seconds and have to sample it at 100 MHz.Then I need only 50 samples from the sampled signal. Which is the correct way to do it? 1. t = 0:1/fs: T-(1/fs) and select the first 50 samples OR 2. t = 0:1/fs: 1-(1/fs) and select the first 50 samples ?

Risposte (1)

Star Strider
Star Strider il 20 Feb 2017
When in doubt, experiment!
For example:
T= 2E-5; % Signal Duration (seconds)
fs = 1E+8; % Sampling Frequency (Hz)
t = 0:1/fs: T-(1/fs); % Time Vector
Tlims = [t(1) t(end)] % Time Vector: Beginning & End (seconds)
Tlimus = Tlims * 1E+6 % Time Vector: Beginning & End (microseconds)
Tlims =
0 1.999e-05
Tlimus =
0 19.99
So the first time vector assignment will give you the correct times, and a (1x2000) length vector. (The 1E+6 conversion factor is in units of microseconds/second, to confirm that the vector is correct for what you want to do.)

Community Treasure Hunt

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

Start Hunting!

Translated by