how to plot phase and frequency
Afficher commentaires plus anciens
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.
Réponses (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)
Catégories
En savoir plus sur Digital Filter Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
