[Scilab-users] {EXT} need a more efficient and faster code: suggestions welcome

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Wed Jan 31 09:36:27 CET 2018


Hello,

The following suggestions will probably not have a drastic influence
(I don't see how it could be more vectorised)
but his a little thing I see:

> De : users [mailto:users-bounces at lists.scilab.org] De la part de Heinz Nabielek
> Envoyé : mercredi 31 janvier 2018 00:13
>
>    MinDist=[MinDist sqrt(min(sum(DIFF.^2,2)))];

Maybe you could concatenate the squares of the distance
and then compute the square root of the whole vector in the end:

sqMinDist=[sqMinDist min(sum(DIFF.^2,2))];

…

end

…

MinDist = sqrt(sqMinDist)

Hope this helps,

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