[Bugzilla] [Bug 8669] Samuel GOUGEON has commented the bug

bugzilla.admin at scilab.org bugzilla.admin at scilab.org
Sun Apr 19 17:20:12 CEST 2015


http://bugzilla.scilab.org/show_bug.cgi?id=8669
--------- Bug Summary -----------
Incorrect submatrix insertion. A = rand(3,3,1); B = rand(3,3); A(:,:) = B

---------- Changed by ------------
sgougeon at free.fr

---------- What changed ----------

--- Comment #11 from Samuel GOUGEON <sgougeon at free.fr> ---
(In reply to ruben from comment #8)
> 
> Another example is:
> t = 4*ones(4,3,1)
> s = ones(1,7)
> size(t.*.s)
>  ans  =
>  
>     4.    21.  
> When I would like it to be 4. 3. 7.

There is no reason for that. Indeed, ones(1,7) is equivalent to ones(1,7,1). Then, the expected size of t.*.s is [4*1 3*7 1*1] == [4 21 1] that is
automatically squeezed into [4 21].
To get a [4 3 7] sized result, you must use s = ones(1,1,7). That works.

Samuel

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20150419/52c781b5/attachment.htm>


More information about the Bugzilla mailing list