[Scilab-users] {EXT} Re: is vectorization possible

Dang Ngoc Chan, Christophe Christophe.Dang at sidel.com
Tue Sep 27 10:48:08 CEST 2016


Hello,

> De : paul.carrico at free.fr
> Envoyé : mardi 27 septembre 2016 10:27
>
> It works now

To have it complete, my solution, once debugged,
is twice slower than the vectorised solution
(but faster than the initial loop)

tic()
indices0 = 0:w:(k-1);
tmp3 = zeros(n,1);
for i = 1 : w
    indices = indices0 + i;
    tmp3 = tmp3 + a(indices);
end
duree_loop3 = toc()

(my email delivery seems quite slow today, so you might see this a bit late).

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