필터 지우기
필터 지우기

How to generate(create) train of pulse signals

조회 수: 4 (최근 30일)
Gova ReDDy
Gova ReDDy 2013년 12월 31일
편집: Walter Roberson 2013년 12월 31일
Hello,
Can someone explain of how to create train of pulse signals with
1)sampling freq=500Hz,number of samples=1000 with amplitude of 1 and freq=2Hz
2)And how to add some high freq components to the pulse signals generated from step1
Thanks.

채택된 답변

Walter Roberson
Walter Roberson 2013년 12월 31일
편집: Walter Roberson 2013년 12월 31일
pulsetrain = repmat( [1 * ones(1,125), -1 * ones(1,125)], 1, 4);
(125 + 125) * 4 = 1000 samples.
1000 cycles / 500 cycles/s = 2 seconds.
2 s * 2 cycles/s = 4 cycles. Each cycle has 2 phases, so 2*4 = 8 half-cycles. 1000 / 8 = 125 samples per half-cycle.
If you want to add high frequency components, you can make the same sort of calculations to find what to add. Do remember, though, that the addition of 1's and -1's can add up to greater than 1 or less than -1; you will need to decide what you want to do about that.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Continuous Waveforms에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by