how to plot phase and frequency

How can I plot the gain magnitude and phase versus frequency for 0<=f<=10  kHz knowing that Av(f)=1+K e^(j*2*pi* f*t_d). Given K = 0.5 and t_d =1  ms.
I am not sure how to even start to set it up, i will appreciate some help.

回答 (1 件)

Voss
Voss 2024 年 3 月 7 日

1 投票

K = 0.5;
t_d = 0.001; % 1 ms
f = linspace(0,10000,1000); % 1000 f values from 0 to 10 kHz
Av = 1+K*exp(-1j*2*pi*f*t_d);
Av_mag = abs(Av);
Av_phase = angle(Av);
figure
subplot(2,1,1)
plot(f,Av_mag)
subplot(2,1,2)
plot(f,Av_phase)

2 件のコメント

Valentina
Valentina 2024 年 3 月 7 日
thank you so much!
Voss
Voss 2024 年 3 月 7 日
You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

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

カテゴリ

質問済み:

2024 年 3 月 7 日

コメント済み:

2024 年 3 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by