[Top][All Lists]

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

Re: Arrays Linear Indexing

From: James Sherman Jr.
Subject: Re: Arrays Linear Indexing
Date: Sun, 17 Feb 2019 17:15:59 -0500

On Sun, Feb 17, 2019 at 5:05 PM khalil2535 <address@hidden> wrote:
Hello There , I am a student and i have a matlab course (specisally in image
and audio processing)

I am running Octave as a full replacment of matlab , the first difference i
come across untill now is that octave don't support linear array indexing
for non linear arrays

for example this code :

x = [1:10;2:2:20; 1.1:0.1:2];
x_1 = x(2,6);
x_2 = x(17);

Result on Matlab2019 : x_1 and x_2 values will be the same.
Result on Octave 4.2.2 : x_1 get the value but x_2 will get an error said
"error: x(17): out of bound 1".

Sent from:


What version of Octave are you running?  I currently have version 4.2.1 and that code works as you expect (both return 12).

James Sherman

reply via email to

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