1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Is there a way to solve singular matrix on MATLAB

  1. May 10, 2009 #1
    if i have a matrix which i singular, and i need to find a general solution to it, is there a way to do this using linsolve or any other command,

    for example, if i have

    2x+y=5
    x+z=2
    3x+y+z=7

    is there any way i can get a solution of
    x=x
    y=5-2x
    z=2-x
     
  2. jcsd
  3. May 10, 2009 #2
    Rearrange your matrix in reverse order:

    Code (Text):
      z y x
    [ 0 1 2 ]
    [ 1 0 1 ]
    [ 1 1 3 ]
    Then augment it:

    Code (Text):
      z y x
    [ 0 1 2 5 ]
    [ 1 0 1 2 ]
    [ 1 1 3 7 ]
    Then you need to calculate the Row Reduced Echelon Form:

    Code (Text):
      z y x
    [ 1 0 1 2 ]
    [ 0 1 2 5 ]
    [ 0 0 0 0 ]
    From this you can see that x=x (bottom row), and y = 5 - 2x (second row) and z = 2 - x (first row).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Is there a way to solve singular matrix on MATLAB
  1. Matlab - Banded Matrix (Replies: 1)

Loading...