help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

size of NDArrays


From: Thomas L. Scofield
Subject: size of NDArrays
Date: Mon, 11 Aug 2008 14:37:15 -0400


This is probably documented somewhere and I cannot find it.  I am writing a dynamically-linked function that needs to be able to work on NDArrays with N > 3.  Inside the .cc file I have a function like this:

void
subsidiaryFn (cont octave_value& param)
{
  uint8NDArray m = param.uint8_array_value ();
}

I can use

   m.dims ()

to find out how many coordinates the new array m has.  But how do I find out the range of values in a particular coordinate?  That is, if the original call within Octave sent a matrix A satisfying

   size(A) = [256   256   3   10]

which is what is stored in the argument param, then

   m.dims ()

would equal 4.  But what method tells me that the largest valid entry in the 4th position is 9?

Thomas L. Scofield
--------------------------------------------------------
Associate Professor
Department of Mathematics and Statistics
Calvin College
--------------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]