[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dimension slice
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: dimension slice |
Date: |
Thu, 6 Jan 2011 23:50:12 -0600 |
On 6 January 2011 21:40, Glen Shennan <address@hidden> wrote:
> You mean matrix(1,:,:) Yes, that worked, cheers. But is there a way to do
> it in the n-dimensional case?
Flatten it into a normal matrix, perhaps obtained with a Kronecker
(tensor) product and slice it like so?
a(k:k+1,j:j+1)
in order to get the 2x2 block at the j,k position.
I know what you think you want, but what you really want is this. ;-)
Octave Nd-arrays should be used sparingly. Octave is highly optimised
for ordinary matrices, not Nd-arrays. Okay, maybe Jaroslav optimised
Nd-arrays much more while I wasn't looking, but Nd-arrays of high
dimensionality are still in general somewhat awkward. Stick to normal
matrices.
- Jordi G. H.