Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
SOLVING LINEAR EQUATION USING MATRICES

Subject: SOLVING LINEAR EQUATION USING MATRICES

From: Slawomir

Date: 27 Apr, 2012 19:27:07

Message: 1 of 2

Hello!

I am trying to solve 6 equations by using invertible matrix, and I get the result, but I am afraid not quite correct, because I do not know how to put into this equation Z1-Z6 (resistance) as a constant, because we do not know whether it is 1 OHM or 100.

http://www.freeimagehosting.net/ktrrc

This is what I mean:




A = [1 1 0 0 -1 0
         0 -1 1 0 0 -1
         -1 0 -1 1 0 0
         1*Z1 0 0 1*Z4 1*Z5 0
         0 1*Z2 0 0 1*Z5 -1*Z6
         0 0 1*Z3 1*Z4 0 1*Z6];

I thought if to declare lets say:
x1=Z1
x2=Z2
etc.
and replace 1*Z1 with 1*x1 and so on.

Do you have any idea how can I do it or solve it differently?

If I will remove resistance constant, all seems to be okay, but it is obvious that we are not allowed to leave it.


% =========================
A = [1 1 0 0 -1 0
         0 -1 1 0 0 -1
         -1 0 -1 1 0 0
         1 0 0 1 1 0
         0 1 0 0 1 -1
         0 0 1 1 0 1]; % Matrix of coefficients
        
b = [0;0;0;1;1;1] % Unknown vector

x = inv(A) * b % Data vector

I1 = x(1) % Current 1
I2 = x(2) % Current 2
I3 = x(3) % Current 3
I4 = x(4) % Current 4
I5 = x(5) % Current 5
I6 = x(6) % Current 6
% ==============================


Results:
x = 0
    0.5000
    0.5000
    0.5000
    0.5000
         0

I1 = 0
I2 = 0.5000
I3 = 0.5000
I4 = 0.5000
I5 = 0.5000
I6 = 0


Thanks for helping!

Subject: SOLVING LINEAR EQUATION USING MATRICES

From: Roger Stafford

Date: 27 Apr, 2012 20:17:12

Message: 2 of 2

"Slawomir" wrote in message <jnerub$57r$1@newscl01ah.mathworks.com>...
> I am trying to solve 6 equations by using invertible matrix, and I get the result, but I am afraid not quite correct, because I do not know how to put into this equation Z1-Z6 (resistance) as a constant, because we do not know whether it is 1 OHM or 100.
- - - - - - - - - -
  As much as you would like things to be otherwise, there is no way you can solve for the six currents without knowing the six impedances, Z1 to Z6. The best you could do is to use the symbolic toolbox to obtain the currents expressed as functions of these six impedances. That still does not give you explicit numeric values for the currents until you have substituted in the proper impedance values.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us