Rectangular Pulse MATLAB implementation

Hey Guys just asking how you would implement this function into matlab. I'm quite unfamiliar with the Rectangular pulse function and I am wondering how I would represent this function. My key issues are how to implement the Base 5000 values and the (f+ or f- 6000) system. This is a Fourier transform so don't worry about f too much.
Thanks a lot for your help!

1 件のコメント

Navya Seelam
Navya Seelam 2020 年 5 月 12 日
What does the base 5000 indicate?

サインインしてコメントする。

回答 (1 件)

MULI
MULI 2025 年 6 月 5 日
編集済み: MULI 2025 年 6 月 5 日

0 投票

From your attached image I understand that the equation represents two rectangular pulses (each of width 5000 Hz), centered at ±6000 Hz, and scaled by 3/2. This can be implemented using "rectpuls" function from the Signal Processing Toolbox.
f = -20000:1:20000;
s_rov = (3/2) * (rectpuls((f - 6000)/5000) + rectpuls((f + 6000)/5000));
The "rectpuls" function generates a pulse of width 1, centered at 0, so scaling is needed.
For more information on this function you can refer to this MathWorks documentation link:

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

質問済み:

2020 年 5 月 9 日

編集済み:

2025 年 6 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by