How can I plot this signal?

5 visualizaciones (últimos 30 días)
Niloufar
Niloufar el 2 de Nov. de 2022
Respondida: KALYAN ACHARJYA el 2 de Nov. de 2022
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');

Respuesta aceptada

Alan Stevens
Alan Stevens el 2 de Nov. de 2022
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

Más respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Nov. de 2022
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');

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by