[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
abstracting n-dimensional subscripting
From: |
G B |
Subject: |
abstracting n-dimensional subscripting |
Date: |
Tue, 10 May 2011 18:04:07 -0700 (PDT) |
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.
- abstracting n-dimensional subscripting,
G B <=