bug in assignment to multidimensional array

Jaroslav Hajek highegg at gmail.com
Sat May 9 12:19:11 CDT 2009


On Sat, May 9, 2009 at 1:29 PM, c. <kingcrimson at tiscali.it> wrote:
> To: bug at octave.org
> Cc: cdf at users.sourcefoge.net
>
> Subject: bug in assignment to multidimensional array
> --------
> Bug report for Octave 3.1.55 configured for i386-apple-darwin9.6.0
>
> Description:
> -----------
>
> On Octave compiled from source pulled today from mercurial I see the
> following behaviour that looks like a bug to me:
>
>  >> version
> ans = 3.1.55
>  >> clear all
>  >> a(1:2,1,:) = rand(2,5)
> error: A(I,J,...) = X: dimensions mismatch
>
> -------------------------------------
> with the 3.0.5 version and with Matlab R2007b I used to get:
>
>  >> version
> ans = 3.0.5
>  >> clear all
>  >> a(1:2,1,:) = rand(2,5)
>
> a =
>
> ans(:,:,1) =
>
>    0.968371
>    0.089077
>
> ans(:,:,2) =
>
>    0.730373
>    0.059839
>
> ans(:,:,3) =
>
>    0.80551
>    0.13555
>
> ans(:,:,4) =
>
>    0.74219
>    0.42371
>
> ans(:,:,5) =
>
>    0.066100
>    0.850109
>
>
> Repeat-By:
> ---------
>
> a(1:2,1,:) = rand(2,5)
>
> Fix:
> ---
>
> sorry, I'm not able to debug this myself
>
>
>

Please see
http://hg.savannah.gnu.org/hgweb/octave/rev/864805896876

regards

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



More information about the Bug-octave mailing list