So i have an m dimensional square matrix, and i loop over the elements a lot and update the elements with an equation as i go. Weirdest thing is that at the start, the iterations are slow, but get faster exponentially until they reach a limit of "maximum speed". I used tic toc to show this in a graph.
the horizontal axis represents the "i-th" iteration and the vertical axis is the speed of that iteration. I should note that the matrix elements are complex numbers, and they do not generally converge to some value. I'm sure my results are correct because i succesfully reproduced results of a published paper from 2005.
I found it amazing that the loop is getting faster, and I was wondering why that is happening. Also what sets the fastest time?
I did not post the loop code because i didn't think there was anything special about it. Here it is!
timing(j-1) = toc;
t is just an array for time (0:0.01:10). phi is a (3,m,m) array of complex numbers, and r is an array of length(t).
I can't have a bug because i reproduced the results in a published paper! and also the results make sense physically.