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.

Antworten (1)

Voss
Voss am 7 Mär. 2024

1 Stimme

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 Kommentare

Valentina
Valentina am 7 Mär. 2024
thank you so much!
Voss
Voss am 7 Mär. 2024
You're welcome! Any questions, let me know. Otherwise, please "Accept" this answer. Thanks!

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 7 Mär. 2024

Kommentiert:

am 7 Mär. 2024

Community Treasure Hunt

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

Start Hunting!

Translated by