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

New to MATLAB?

Doing back sunstitution for Gauss Elimination

Asked by Nicholas

Nicholas (view profile)

on 30 Sep 2013
Latest activity Edited by Jan Simon

Jan Simon (view profile)

on 30 Sep 2013

I have Anew=[2 1 -1;0 2.5 -1.5;0 0 2.4] and bnew=[0;-3;4.8]

using back substitution only i need to find my x1, x2 and x3 values. I cant use inv(Anew)*bnew or rref() i need my program to use back projection. I think i need a for loop or something but i'm stuck and out of ideas at the moment please help. answers should be...

x1=1

x2=0

x3=2

0 Comments

Nicholas

Nicholas (view profile)

Products

No products are associated with this question.

1 Answer

Answer by Jan Simon

Jan Simon (view profile)

on 30 Sep 2013
Edited by Jan Simon

Jan Simon (view profile)

on 30 Sep 2013

Write down the equation on paper at first (I omit the "new" here):

A * x = b
[2 1   -1;       [x1;     [0;
 0 2.5 -1.5;  *   x2;  =   -3;
 0 0   2.4]       x3]      4.8]

You have a triangle matrix on the left, such the back-substitution can be applied directly. Start to solve the last row to get x3:

0*x1 + 0*x2 + 2.4*x3 = 4.8

Use the result to solve the 2nd last row to get x2 and so on. A short look into WikiPedia might be useful also.

0 Comments

Jan Simon

Jan Simon (view profile)

Contact us