Fri 03 Dec 2010 01:53:24 AM UTC, original submission:
this script correctly returns geo = 0.62970 in 3.0.1 and Matlab 2010a but "error: A(I,J,...) = X: dimensions mismatch" in 3.2.4 and 3.3.54+
geo = [0.6297]
c2 = [0.6562]
ic2 = (c2 < 0.3)
c = [0.8082]
geo (1,ic2) = acos(c(ic2))
this is on a windows build in all three cases.
Also (reported from: http://octave.1599824.n4.nabble.com/logical-indexing-regression-3-0-1-vs-3-2-4-td3067780.html)
Yes, in a GNU/Linux build in 3.2.4 and current tip. In current tip
(your script reduces to the first two lines):
octave:1> a = 1;
octave:2> a(1, false) = acos ([])
error: A(I,J,...) = X: dimensions mismatch
octave:2> a(1, false) = zeros (0, 0)
error: A(I,J,...) = X: dimensions mismatch
but weirdly:
octave:2> a(1, false) = []
error: A null assignment can only have one non-colon index.
octave:2> a(1, false) = zeros (1, 0)
a = 1
octave:3> a(1, false) = zeros (0, 1)
a = 1
octave:4> a(1, false)
ans = [](1x0)
octave:5>
|