Need help with graphing program
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!