help-octave
[Top][All Lists]
Advanced

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

Re: 3-dimensional array/matrix in oct-file: crashes


From: Mike Miller
Subject: Re: 3-dimensional array/matrix in oct-file: crashes
Date: Wed, 11 Dec 2013 14:08:20 -0500

On Wed, Dec 11, 2013 at 10:37:35 -0800, marcimatz wrote:
> I wish to create an RGB image inside of an oct file, and return it to the
> user. I followed instructions here:
>
> http://www.gnu.org/software/octave/doc/interpreter/Matrices-and-Arrays-in-Oct_002dFiles.html
>
> and implemented following code that crashes:
>
> dim_vector dv (3);
> dv(0) = resolutionX;
> dv(1) = resolutionY;
> dv(2) = 3;
> Matrix mat(dv);
>
> is that normal? I did exactly as indicated in the previous link.

A Matrix is a 2-dimensional array. You probably want NDArray instead.

HTH,

-- 
mike


reply via email to

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