background image

 

 

SYMULACJA KOMPUTEROWA OBWODÓW ELEKTRYCZNYCH 

% dane obwodu R[ohm] E[volt]

 

R1=3; 
R2=6; 
R3=9; 
R4=6; 
R5=8; 
R6=2; 
E1=177; 

%zapis macierzowy układu równań

 

A=[1 -1 -1 0 0 0 0 0 0 0 0; 
   0 0 1 -1 -1 0 0 0 0 0 0; 
   0 0 0 0 0 -1 -1 0 0 0 0; 
   0 0 0 0 0 0 1 -1 -1 0 0; 
   0 0 0 0 0 0 0 0 1 -1 -1; 
   R1 0 0 0 0 -1 0 0 0 0 0; 
   0 R2 0 0 0 0 -1 0 0 0 0; 
   0 0 R3 0 0 0 0 -1 0 0 0; 
   0 0 0 R4 0 0 0 0 -1 0 0; 
   0 0 0 0 R5 0 0 0 0 -1 0; 
   0 0 0 0 R6 0 0 0 0 0 -1]; 
B=[0 0 E1 0 0 0 0 0 0 0 0 ]'; 
X=inv(A)*B; 
i1=X(1);,i2=X(2);,i3=X(3);,i4=X(4);,i5=X(5);,U1=X(6);,U2=X(7); 
U3=X(8);,U4=X(9);,U5=X(10);,U6=X(11); 

% wyświetlenie danych

 

fprintf(

'i1=%0.4g, i2=%0.4g, i3=%0.4g, i4=%0.4g, i5=%0.4g'

 

,abs(i1),abs(i2),abs(U3),abs(i4),abs(i5)); 
fprintf( 

'U1=%0.4g,  U1=%0.4g, U2=%0.4g, U3=%0.4g, U4=%0.4g, U5=%0.4g, 

U6=%0.4g'

,abs(U1),abs(U2),abs(U3),abs(U4),abs(U5),abs(U6)); 

 
i1=25, i2=17, i3=72, i4=5, i5=3,  U1=75,  U1=102, U2=72, U3=72, U4=30, U5=24, U6=6>> 
 
 

background image
background image

 

background image