Kelvin's Octave Assignment

From Class Wiki
Revision as of 21:37, 3 October 2010 by Kelvin.bidwell (talk | contribs)
Jump to navigation Jump to search

Solve Linear System of EQ's with Octave

This will solve and print solutions for the equations:

1×x1+2×x2+3×x3=1

4×x1+5×x2+6×x3=2

7×x1+8×x2+9×x3=3


clear all
close all
A=[1,2,3
   4,5,6
   7,8,9];
b=[1
   2
   3];
result = A\b;
x1=result(1)
x2=result(2)
x3=result(3)