P4.3-4. Determine the values of the node voltages, v1, v2 and v3 in the circuit shown in

Figure P4.3-4

 

P4_3_4

Figure P 4.3-4

 

Write out the node equations

 

Nodes v1 and v3 are a supernode, so we have the following two equations

 

and

 

For Node v2

 

Simplify by finding common denominators

 

 

 

 

 

So our three equations and three unknowns are:

 

 

 

Plug into MATLAB

 

Answers are

 

MATLAB Code follows:

 

%Program to solve homework problem PH 320 P04P03D04

%version 2019-01-29 DW Donovan

clear all;

 

A = [9 -6 12;8 -17 4;1 0 -1];

B = [25 0 -15]';

xx = A\B;

 

x1 = xx(1);

x2 = xx(2);

x3 = xx(3);

 

Ans = {['v1 = ' num2str(x1) ' V'];

    ['v2 = ' num2str(x2) ' V'];

    ['v3 = ' num2str(x3) ' V']};

 

Ans

 

%{

Ans =

    'v1 = -7.9825 V'

    'v2 = -2.1053 V'

    'v3 = 7.0175 V'

%}

 

 

 

 

Please send any comments or questions about this page to ddonovan@nmu.edu

This page last updated on January 29, 2019