Fundamentals of electric circuits 5th edition
I try to use matlab to sovle this problem
%% pp10.6 fundunmental of circuit
% page 424
% w=5, 75@0 voltage
%caculate the voltage by 75sin5t
w1=5;C=0.2,L=1;
R=8; ZC1=-j/(w1*C)
ZL1=j*w1*L
Vs=75
ZP1=ZC1*ZL1/(ZC1+ZL1) %% parallel impedance
vo1=Vs*ZP1/(ZP1+R)
[theta1,rho1]=cart2pol(real(vo1),imag(vo1)) %get the amplitude and angle
X1=['vo1=',num2str(rho1),'*cos(5t',num2str(theta1*180/pi),')']
disp(X1)
% caculate the voltage by current source 6 cos10tA
% w=10, I=6, current
w2=10;I=6;
ZC2=-j/(w2*C)
ZL2=j*w2*L
ZP2=ZC2*R/(ZC2+R) %% parallel impedance R,C
ZP3=ZP2*ZL2/(ZP2+ZL2) % total parallel impedance RLC
vo2=I*ZP3 % parallel voltage
[theta1,rho1]=cart2pol(real(vo1),imag(vo2))%get the amplitude and angle
X2=['+vo2 ',num2str(rho1),'*cos(5t',num2str(theta1*180/pi),')'];
disp(X2)
% total answer
X=[X1,X2]
disp(X)
In the code, I use cart2pol to get the amplitude and angle ,therfore, I can easily transform phasor to time domain.