I am asked to compare the fitted error to the error of original fit of a set of data labeled data_valid_fit. Using a given equation I calculated the fitting error as below:
valid_data_fit = y0.*exp(r*tvalid)
e = 1/length(t)*sqrt(sum((valid_data_fit - datavalid).^2))
If my function is y= y0*exp(r*t) and I calculated datafit using that function and:
t = [ 0, 13, 36, 46, 61, 64, 70, 75, 78].
How can I calculate the error of original fit?