MATLAB: How to constrain a vector’s value within a nonlinear fit curve fittingnonlinearvector I am fitting a set of data using nlinfit as magnetic dipoles and I want my fitted parameters to be only positive. How do I make this constraint? Best Answer Put them in the fittype equation as parameters-squared.Best wishesTorsten. Related SolutionsMATLAB: How to fit a logarithmic curve to the data; Use lsqcurvefit (or fminsearch if you don't have the optimization toolbox).Best wishesTorsten. MATLAB: Can you constrain the boundary conditions of a smoothing spline fit It's possible with this,https://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling Related QuestionBest curve fitting for measured dataFmincon and constrains
Best Answer