Phương pháp giải Mạch 1 với Matlab Biên soạn: Ths Phan Như Quân Trang 1 PHƯƠNG PHÁP GIẢI MẠCH VỚI MATLAB Bài 1: I1 R2 1k V1 I3 R3 1k R4 0.5k Ia 1A V2 R1 0.5k I2 I4 0 function bai1 R1=0.5; R2=1; R3=1; R4=0.5; Ia=1; G1=1/R1; G2=1/R2; G3=1/R3; G4=1/R4; G=zeros(2,2); G=A_array(1,0,G1+G2,G); G=A_array(1,2,G3,G); G=A_array(2,0,G4,G); I=zeros(2,1); I=b_array(0,2,Ia,I); V=G\I; disp(['Dien the nut 1: V1=',num2str(V(1)), ' V']); disp(['Dien the nut 2: V2=',num2str(V(2)), ' V']); disp(['Dong dien: I1=',num2str(V(1)/R1), ' A']); disp(['Dong dien: I2=',num2str(V(1)/R2), ' A']); disp(['Dong dien: I3=',num2str((V(1)-V(2))/R3), ' A']); disp(['Dong dien: I4=',num2str(V(2)/R4), ' A']); kết quả Dien the nut 1: V1=0.090909 V Dien the nut 2: V2=0.36364 V Dong dien: I1=0.18182 A Dong dien: I2=0.090909 A Dong dien: I3=-0.27273 A Dong dien: I4=0.72727 A Phương pháp giải Mạch 1 với Matlab Biên soạn: Ths Phan Như Quân Trang 2 Bài 2 G1 2s Ia=1A G2 1s V1 V2 V3 Ib=2A G5 4s G4 2s G3 1s function bai2 G1=2; G2=1; G3=1; G4=2; G5=4; Ia=1; Ib=2; G=zeros(3,3); G=A_array(1,0,G1,G); G=A_array(1,2,G2,G); G=A_array(2,0,G3,G); G=A_array(2,3,G4,G); G=A_array(3,0,G5,G); I=zeros(3,1); I=b_array(0,1,Ia,I); I=b_array(2,3,Ib,I); V=G\I; disp(['dien the nut 1: V1=',num2str(V(1)),' V']); disp(['dien the nut 2: V2=',num2str(V(2)),' V']); disp(['dien the nut 3: V3=',num2str(V(3)),' V']); disp(['dong dien I1=',num2str(V(1)*G1),' A']); disp(['dong dien I2=',num2str((V(1)-V(2))*G2),' A']); disp(['dong dien I3=',num2str(V(2)*G3),' A']); disp(['dong dien I4=',num2str((V(2)-V(3))*G1),' A']); disp(['dong dien I5=',num2str(V(3)*G5),' A']); kết quả dien the nut 1: V1=0.22222 V dien the nut 2: V2=-0.33333 V dien the nut 3: V3=0.22222 V dong dien I1=0.44444 A dong dien I2=0.55556 A dong dien I3=-0.33333 A dong dien I4=-1.1111 A dong dien I5=0.88889 A Phương pháp giải Mạch 1 với Matlab Biên soạn: Ths Phan Như Quân Trang 3 Bài 3 R2 1k V2 R3 6k Ia 4A 0 V1 R4 2k R1 2k R5 3k function bai3 R1=2;R2=1;R3=6;R4=2;R5=3; G1=1/R1;G2=1/R2;G3=1/R3;G4=1/R4;G5=1/R5;Ia=4; G=zeros(2,2); G=A_array(1,0,G1,G); G=A_array(1,2,G2,G); G=A_array(2,0,G3+G4+G5,G); I=zeros(2,1); I=b_array(0,1,Ia,I); V=G\I; disp(['dien the nut 1: V1=',num2str(V(1)),' V']); disp(['dien the nut 2: V2=',num2str(V(2)),' V']); disp(['dong dien I1=',num2str(V(1)/R1),' A']); disp(['dong dien I2=',num2str((V(1)-V(2))/R2),' A']); disp(['dong dien I3=',num2str(V(2)/R3),' A']); disp(['dong dien I4=',num2str(V(2)/R4),' A']); disp(['dong dien I5=',num2str(V(2)/R5),' A']); kết quả dien the nut 1: V1=4 V dien the nut 2: V2=2 V dong dien I1=2 A dong dien I2=2 A dong dien I3=0.33333 A dong dien I4=1 A dong dien I5=0.66667 A
Bình luận (0)
Chưa có bình luận nào. Hãy là người đầu tiên!