Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLab matrix question

  1. Apr 27, 2005 #1
    Does anyone know how to pull the value of an element which has been calculated and placed in a matrix out of the matrix?


    M = [a1, a2;
    b1, b2];

    c = a1*3;


    I can't seem to find any information online...

  2. jcsd
  3. Apr 28, 2005 #2
    You reference elements like this:

    Given any matrix
    Code (Text):

    an element is accessed by referenceing its row and column position. So,
    M(c,10) would return the element loacted in the third row, 10th column.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook