MATLAB: Why can’t I fit a formula to a data set? How to fix this

boundariescurvecurve fittingcustom functionelasticelastoplasticengineeringerrorfitfittingfittypehigherloweMATLABmechanicalmodelosgoodparameterparametersplasticplasticityrambergstrainstressstudenttensile testuser-defined

could someone please help me fix this problem.
I'm trying to fit my function to the data set. The data is from a tensile test. I'm trying to determine the constants k and n and i don't have any initial parameters for k and n. However when i run it, i get an error. I've tried this before with a different data set and it worked fine.
the fit doesn't have to be super accurate, just one that follows the plot with a smooth curve, so that i can predict the strain at a certain point of stress. (stress-strain curve)

Best Answer

Have you tried Curve Fitting Tool? Here is a 3rd order polynomial for your given data set:
y=1.267e+04*x^3-1.351e+04*x^2+4252*x+0.1923