octave-maintainers
[Top][All Lists]
Advanced

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

Possible bug? cell array indexing problem


From: mass168
Subject: Possible bug? cell array indexing problem
Date: Fri, 14 Dec 2012 10:34:25 -0800 (PST)

In octave 3.6.1, I am not getting the result that I expect for the following
block of code:

y={[1,2,3];[5,8,9];[35:2:46]}

        for n103=1:3
        a=num2str(n103)
        b=strcat('n',a) 
        y{b,1}(1,3)
        endfor

It should simply give the 3rd element of each row vector in the cell array
"y".  However, it is giving the error message: 

"A(I,J): row index out of bounds; value 110 out of bound 3"

for the following row: y{b,1}(1,3)

Since the ASCII value for the letter n is 110, I would assume this problem
has something to do with that? 





--
View this message in context: 
http://octave.1599824.n4.nabble.com/Possible-bug-cell-array-indexing-problem-tp4647924.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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