How can I plot this signal?

5 ビュー (過去 30 日間)
Niloufar
Niloufar 2022 年 11 月 2 日
回答済み: KALYAN ACHARJYA 2022 年 11 月 2 日
I want to plot a magnitude and phase of a signal which the x coordinate is logf and y coordinate once is 20*log(abs(Av)) and once is 20*log(angle(Av)).here is my code but it doesn't plot anything.what is the ploblem?
close all;clear;clc;
gm = 0.04;
RL = 10000;
CL = 10^(-9);
f = logspace(-1,2);
Av = (-gm*RL)/(1 + RL*CL*f*1i);
%magnitude
subplot(2,1,1);
loglog(f,(abs(Av))^20);
title('magnitude');
grid on;
%phase
subplot(2,1,2);
loglog(f,(angle(Av))^20);
title('phase');

採用された回答

Alan Stevens
Alan Stevens 2022 年 11 月 2 日
Like this?
gm = 0.04;
RL = 10000;
CL = 10^(-9);
f = logspace(-1,2);
Av = (-gm*RL)./(1 + RL*CL*f*1i);
%magnitude
subplot(2,1,1);
loglog(f,(abs(Av)).^20); % Notice the dot .^
title('magnitude');
grid on;
%phase
subplot(2,1,2);
loglog(f,(angle(Av)).^20);
title('phase');
grid

その他の回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2022 年 11 月 2 日
gm = 0.04;
RL = 10000;
CL = 10^(-9);
f = logspace(-1,2);
Av = (-gm*RL)./(1 + RL*CL*f*1i);
%magnitude
subplot(2,1,1);
loglog(f,(abs(Av)).^20);
title('magnitude');
grid on;
%phase
subplot(2,1,2);
loglog(f,(angle(Av)).^20);
title('phase');

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by