octave-maintainers
[Top][All Lists]
Advanced

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

Re: Possible bug? cell array indexing problem


From: Carnë Draug
Subject: Re: Possible bug? cell array indexing problem
Date: Mon, 17 Dec 2012 10:23:54 +0100

On 14 December 2012 19:34, mass168 <address@hidden> wrote:
> 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:

Why would you expect that? Why would you expect that indexing with a
string (b is the string "n1" in that example) would work?

Carnë


reply via email to

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