% ch5ex.m - MATLAB input file for Section 5-9



Z = [ 28  -10   -8;        %

     -10   28   -8;        % Mesh Equation 

      -8   -8  16+R];      %

                           % Equation 5.9-3	  

V = [ 12;                  %

      12;                  %

       0 ];                %

	  

	  

Im = Z\V;  % Calculate the mesh currents.

	  

I = Im(3)  % Equation 5.9-2

Figure 5.9-2 MATLAB file used to solve the mesh equation representing the circuit shown in Figure 5.9-1b.