howto matrixes containing e.g. vectors and matrixes and matrix operations

Jordi Gutiérrez Hermoso jordigh at gmail.com
Sun Jun 1 10:13:19 CDT 2008


On 01/06/2008, Schoeller Sebastian <sebastian.schoeller at gmail.com> wrote:
 >  is it possible to create a multidimensional array,


Sure, just index using more than two indices.

 E.g. m(:,1,1) = vector_1, m(:,2,1) = vector_2 and so on. You can then
 do m(:,1,1).*m(:,1,1). You may also be interested in the squeeze
 function.

 N-d arrays, as they are called, do seem to lose a lot of the benefits
 of vectorisation, unfortunately, or they did for me in the past, but
 as far as indexing goes, you can think of them as matrices or
 higher-order tensors.

 HTH,
 - Jordi G. H.


More information about the Help-octave mailing list