Linear Algebra Matlab Help

  • MATLAB
  • Thread starter kahless2005
  • Start date
  • #1

Main Question or Discussion Point

I have an augmented matrix that I need to solve. I have broken it into a 4x4 matrix and a vector. As seen below.

A= 0 1 1 1; 3 0 3 -4; 1 1 1 2; 2 3 1 3

B= 0; 7; 6; 6


I have already worked the matrix out by hand using Gaussian Elimination and have obtained the solution below

Solution: 4; -3; 1; 2

How, do I enter the system into Matlab to get the same answer?
 

Answers and Replies

  • #2
2
0
A= [0 1 1 1; 3 0 3 -4; 1 1 1 2; 2 3 1 3]
B= [0; 7; 6; 6]
solution=A\B
or
solution=inv(A)*B
 

Related Threads on Linear Algebra Matlab Help

  • Last Post
Replies
2
Views
2K
Replies
1
Views
2K
Replies
3
Views
3K
Replies
4
Views
3K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
9
Views
3K
  • Last Post
Replies
6
Views
7K
  • Last Post
Replies
3
Views
5K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
7
Views
3K
Top