Need help with graphing program

조회 수: 3 (최근 30일)
Joseph
Joseph 2014년 2월 27일
답변: Iain 2014년 2월 27일
Create a matlab program to compute the magnitude and phase angle of the impedance(Z) of an RLC series circuit.
Given:
R= 2(resistance in ohms)
L=4e-3(inductance in henries)
C= 10e-6 (capacitance in farads)
Z= R + ((w*L)-(1/(w*C)))*i (impedance in V/A)
:Create a vector of angular frequencies from 1000 1/s to 10000 1/s in steps of 250.
:Create a Z vector for each frequency
:Create a vector containing the magnitude of Z for each frequency
:Create a vector containing the phase angle of Z for each frequency
:Comput the resonant frequency w0 = 1/sqrt(L*C)
:Present results in table and graphs

답변 (1개)

Iain
Iain 2014년 2월 27일
You have your formulae, you just need to make them work.
angular_freqs = 1000:250:10000;
.* and ./ do elementwise multiplication and division.
A = [1;2;3;4;5]; B = -A;
[A B] % makes a table get printed out
plot(A,B) %plots "B" on the y axis and A on the x axis, of a graph.
Any more help than that is me doing your homework for you.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by