필터 지우기
필터 지우기

How to sample a very small duration signal

조회 수: 3 (최근 30일)
Poorva Limaye
Poorva Limaye 2017년 2월 20일
답변: Star Strider 2017년 2월 20일
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 ?

답변 (1개)

Star Strider
Star Strider 2017년 2월 20일
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.)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by