[Scilab-users] {EXT} Re: add number arrays efficiently, how?
Dang Ngoc Chan, Christophe
Christophe.Dang at sidel.com
Fri Mar 24 13:48:48 CET 2017
Hello,
> De : Rafael Guerra
> Envoyé : vendredi 24 mars 2017 13:16
>
> Your code only works if the input arrays are oriented similiarly (both column or row vectors).
> [...]
>
> SumArr = [ 1 2 3 ];
> toAdd = [ 7 8 9 10 ]'
You can transform it to line vectors (or column vectors) with matrix():
[matrix(SumArr, 1, size(SumArr, "*")), matrix(toAdd, 1, size(toAdd, "*"))]
Regards
--
Christophe Dang Ngoc Chan
Mechanical calculation engineer
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
More information about the users
mailing list