I have code that calculates an error for each sample, and i would like to always get the highest value from the last samples.
I want to get the maximum value of the last n samples of error(n-1,1) that were calculated.
Code:
error(n,1)=Ia(n)-Ia_future(n,1)
p(n,1) = (1+0.2)*max(error(n-1,1))
Last edited: