help-octave
[Top][All Lists]
Advanced

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

strange error with octave 4.0 but not in matlab 2013b


From: RT
Subject: strange error with octave 4.0 but not in matlab 2013b
Date: Wed, 1 Jun 2016 16:27:43 -0400

I was trying to circshift using index values.  The original question I had was posted at
http://stackoverflow.com/questions/37575728/circshift-using-index-values/37575834?noredirect=1#comment62641575_37575834

The code that was suggested was.

a = [1,2,30,4,5,60,7,8,90,999]
b((1:numel(a)) + mod(1:numel(a), 3) - 1) = a;

b is equal to 1    30     2     4    60     5     7    90     8   999

but if I try it with octave 4.0 on ubuntu 16.04 64bit
I get an error
"error: Invalid resizing operation or ambiguous assignment to an out-of-bounds array element"

reply via email to

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