How to plot amplitude of phasor from complex number?

조회 수: 4 (최근 30일)
Rafael Estrada
Rafael Estrada 2020년 12월 5일
댓글: Rafael Estrada 2020년 12월 9일
Hello, I am looking to plot the maximum amplitude of a voltage phasor given by:
where V = 10 V, R = 4.7 kΩ, and C = 22 nF, over a range 0 < ω ≤ 100 Mrad/s.
The plot needs to be done with log 10 scale for both the ω and Vc axes.
I have the folowing code, but can't seem to get it figured out.
x = [ -4 : 0.1 : 8];
w = 10 .^ x;
Vc(w) = -(10/(w * 4700 * (22e-9))) - 10i;
plot(w, Vc(w));
Any help would be greatly appreciated.

채택된 답변

VBBV
VBBV 2020년 12월 5일
편집: VBBV 2020년 12월 5일
semilogx(10*log10(w), abs(Vc(w)));
use abs if you want resultant of real and complex values
or
semilogx(10*log10(w), real(Vc(w)));
if you want only real values
  댓글 수: 2
VBBV
VBBV 2020년 12월 6일
편집: VBBV 2020년 12월 6일
%f true
x = [ -4 : 0.1 : 8];
w = 10 .^ x;
Vc = -(10./(w * 4700 * (22e-9))) - 10i;
loglog(10*log10(w), real(Vc));
Rafael Estrada
Rafael Estrada 2020년 12월 9일
Thank you very much!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Frequency-Domain Analysis에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by