Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 668 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 668 Bytes

Function for an Exponential fit for MATLAB without curve fitting toolbox

I had some data ponts and I wanted to fit them exponentially...

I did not have the `proper package' So I made this goofy function... This is pretty niche and worked for my specific problem

This function takes two vectors, x and y then does a linear fit (polyfit) if the fit comes back with an R^2 of > 0.9 then it spits out an error if polytfit comes back < 0.9, then it does another polyfit, now using log10(y) the resulting equation is then solved and turned into an exponential

the function plots your input x and y, along with the exponential fit line and equation