[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
difference of cell arrays behavior between octave-3.0.5 and octave-3.4.2
From: |
Sergei Steshenko |
Subject: |
difference of cell arrays behavior between octave-3.0.5 and octave-3.4.2 |
Date: |
Mon, 1 Aug 2011 02:31:34 -0700 (PDT) |
In octave-3.0.5 I have:
"
octave:1> foo{1}(:) = []
foo =
{
[1,1] = [](0x0)
}
octave:2> foo{2}(:) = [2;3]
foo =
{
[1,1] = [](0x0)
[1,2] =
2 3
}
octave:3>
".
In octave-3.4.2 I have:
"
foo{1}(:) = []
foo =
{
[1,1] = [](0x0)
}
octave:2> foo{2}(:) = [2;3]
error: A(I) = X: X must have the same size as I
octave:2>
".
Why is it so that in octave-3.4.2 I have an error ?
Why at all size checking kicks in - "foo{2}(:)" doesn't yet have size,
it should be created according to RHS.
Which of the two behaviors is nominally correct (Matlab) ?
I've discovered this by running my code which works under octave-3.0.5
and which stopped working under octave-3.4.2.
Thanks,
Sergei.
- difference of cell arrays behavior between octave-3.0.5 and octave-3.4.2,
Sergei Steshenko <=