Plot magnitude and phase plot

17 Ansichten (letzte 30 Tage)
RJS
RJS am 2 Okt. 2021
Bearbeitet: RJS am 6 Okt. 2021
I have one equation in terms of 2 variable A,B, I want to plot magnitude vs phase for different value of A and B .
i don't know how to do this . i was trying but it won't work
for A = -20:1:20
for B = -20:1:20
g = (1 + B*j)/(1 + A*j)
Mag = 20*log10(abs(g))
Phase = angle(g);
plot(Mag,Phase)
hold on
end
end
then obtain value of A and B for particualr value of phase and magnitude

Akzeptierte Antwort

David Hill
David Hill am 2 Okt. 2021
[A,B]=meshgrid(-20:20);
g=(1+1i*B)./(1+1i*A);
M=20*log10(abs(g));
P=angle(g);
plot(M,P);
  1 Kommentar
RJS
RJS am 3 Okt. 2021
Bearbeitet: RJS am 3 Okt. 2021
Thank you @David Hill, I want to draw this type of figure pls help and then obtain value of A and B for particualr value of phase and magnitude

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by