[Scilab-users] redundant values
Paul Carrico
paul.carrico at free.fr
Sun Dec 16 19:29:27 CET 2012
Dear All
In order to solve faster (i.e to avoid unnecessary calculations), I need to
look for redundant values
How can I improve the code hereafter, especially the "if" loop ?
NB : please note the test is integrated in a loop, then the cste values
change every loop !
Any advice ?
Regards
Paul
i = 1;
while (cste(i) <> cste($))
k = find(cste == cste(i))';
nl_k = size(k, "*")
if (nl_k > 1) then
cste(k(2:$))=[];
end
i = i + 1;
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121216/e8ba7be4/attachment.htm>
More information about the users
mailing list