[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39789] Error while indexing certain cell expr
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #39789] Error while indexing certain cell expressions |
Date: |
Tue, 20 Aug 2013 05:08:25 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:23.0) Gecko/20100101 Firefox/23.0 |
Update of bug #39789 (project octave):
Status: None => Confirmed
_______________________________________________________
Follow-up Comment #1:
Confirmed on a recent development tip (hg id bc924baa2c4e). The issue is with
how trailing dimensions are treated, and it would be useful to know how Matlab
behaves for the same code input if you have access to it.
The code
c = cell (1,1,1);
does not create a 1x1x1 cell array. In Octave and Matlab trailing singleton
dimensions are usually removed so this becomes
c = cell (1,1);
This can be checked with
c = cell (1,1,1);
size (c)
ans =
1 1
Your code sample works if the cell array is truly 3-dimensional.
c = cell (1,1,2);
c{1,1,1} = zeros (5,2);
c{1,1,1}(:, 1) = 1;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39789>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/