I've got two arrays;
R = [r0, r1, r2, ..., r999]
Z = [z0, z1, z2, ..., z999]
I want to apply polyfit to the above, where the function is R(z). I need the polynomial to be x^2+x^4+x^6+x^8
In excel, the trend function does not allow for only even powers, so I've tried to write this in Matlab, but I can't figure out how customise polyfit so that it only uses even powers as described above.
Any suggestions? thanks