On Tue, May 10, 2011 at 9:04 PM, G B
<address@hidden> wrote:
What is the best way to index an n-dimensional matrix, if I have a vector of
n indices?
If I have a 2D matrix M, and vector [j,k], I want M(j,k).
If I have a 3D matrix M, and vector [j,k,m], I want M(j,k,m).
I know that if I just do M([j,k,m]), I'll get three elements back.
Apologies if this is clearly stated in some document-- I've looked, but I'm
not finding a reference to this particular problem.
--
View this message in context: http://octave.1599824.n4.nabble.com/abstracting-n-dimensional-subscripting-tp3513438p3513438.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave