<HTML dir=ltr><HEAD>
<META content="text/html; charset=unicode" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7601.17998"></HEAD>
<BODY>
<DIV><FONT color=#000000 size=2 face=Arial>Hello,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I have much difficulty to optimize my calculation. It consists of calculating the variance of a vector over last N elements . See the example in the attached file for a 3D matrix. With a PC under windows 7 and scilab 5.3, it needs 40 sec to calculate the variance for a 10*10*1000 matrix. This is too much long since I have much bigger files to work on.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>There must be a way to vectorize the problem but I do not see how ?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>Thanks in advance,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Stéphane</FONT></DIV></BODY></HTML>