Question: Time take to execute code

January 15 2014 abbeykabir 45
Maple 17
2

Hello guys, I want maple to show me the time taken to execute the entire 500 loops shown in the code below. I read maple help and was able to come up with the code  (just part of the whole code).

st := time[real]():

for k from 1 to 500 do

  sol := LinearSolve(A, eval(b, [y[0]=y_init,z[0]=z_init])):
  y_init:=sol[9]:
  z_init:=sol[10]:
end do:


time[real]() - st;

my problem is that the time that shows varies/differs if i run it several times. I was expecting the same time interval of calculation. Am I doing something wrong?

Please Wait...