P 4.2-2 Determine the node voltages for the circuit of Figure P 4.2-2.

Answer: v1 = 2 V, v2 = 30 V, and v3 = 24 V

p4_3_2

Figure P 4.2-2

 

Write a voltage node equation at v1

Multiply equation by 20 and we get

 

Write another voltage node equation at v2

Multiply equation by 20 and we get

 

Finally, voltage node equation at v3

Multiply equation by 30 and we get

 

So we can write our three equations with three unknowns as

 

 

 

 

Using MATLAB, the answers are

 

MATLAB Code Follows:

%Program to solve PH 320 Homework Problem P4.2-2

%version 2019-01-26 DW Donovan

clear all;

 

GG = [5 -1 0; -1 3 -2; 0 -3 5];

II = [-20 40 30]';

VV = GG\II;

 

v1 = VV(1);

v2 = VV(2);

v3 = VV(3);

 

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

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

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

   

Ans

 

%{

Ans =

    'v1 = 2 V'

    'v2 = 30 V'

    'v3 = 24 V'

%}

 

 

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

This page last updated on January 26, 2019