Help with array index

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with array index

promach
why doesn't lena_blue(3) equals to 133 ?






lena512color.tiff (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help with array index

mmuetzel
You are using a linear index where you probably wanted to index into the 2nd
dimension of the Matrix.
Try: lena_blue(1,3)
Reading "8.1.1 Advanced Indexing" [1] might help.

[1] https://octave.org/doc/v4.2.2/Advanced-Indexing.html



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html