[Scilab-users] Regarding simple numerical operations result display.

Dang, Christophe Christophe.Dang at sidel.com
Tue Mar 19 09:26:57 CET 2013


Hello, 

De la part de Stefan Du Rietz
Envoyé : lundi 18 mars 2013 17:23

> But as usual there is a better (faster, simpler) solution without a
> loop!
>
> // sort in reverse order and get indices
> [ysort, k] = gsort(data(:, 2));

Well, there are loops, hidden in gsort(), which is a quicksort.

I think it is faster because you perform the loops only once.

For optimisation in finding the highest -- or lowest -- values,
you might find some ideas there:

http://en.wikipedia.org/wiki/Selection_algorithm

Best 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