Prev: Sort cell array
Next: Regexp IF statement
From: Jack Branning on 23 Jul 2010 09:59 Does anyone know how I can find out what position a particular entry in a matrix is at, according to its coordinates? For example, I know that the value is in A(2,3), but I need to know what position number in the matrix this is (i.e. position 23). Thanks! Jack
From: Andy on 23 Jul 2010 10:11 "Jack Branning" <jbr.nospam(a)nospam.com> wrote in message <i2c779$aru$1(a)fred.mathworks.com>... > Does anyone know how I can find out what position a particular entry in a matrix is at, according to its coordinates? > > For example, I know that the value is in A(2,3), but I need to know what position number in the matrix this is (i.e. position 23). > > Thanks! > > Jack doc sub2ind
From: Yi Cao on 23 Jul 2010 10:14 "Jack Branning" <jbr.nospam(a)nospam.com> wrote in message <i2c779$aru$1(a)fred.mathworks.com>... > Does anyone know how I can find out what position a particular entry in a matrix is at, according to its coordinates? > > For example, I know that the value is in A(2,3), but I need to know what position number in the matrix this is (i.e. position 23). > > Thanks! > > Jack Try 'help sub2ind' HTH Yi
From: Jack Branning on 23 Jul 2010 10:23 Perfect, that's exactly the function I needed! Thanks!
|
Pages: 1 Prev: Sort cell array Next: Regexp IF statement |