Fitting and imposing certain range in variables

I am trying to fit surface data z=f(x,y) to a function with several parameters using the "fit" function of Matlab.
The resulting function must accomplish that 0<z<1 for the range 0<x<1 at any y. Is it possible to apply it? I have only seen the possibility to impose a range for the parameters, but not the variables.
Thank you!

 채택된 답변

Matt J
Matt J 2018년 7월 24일
편집: Matt J 2018년 7월 24일

1 개 추천

No, it is not possible to apply that requirement directly through the fit() function. There are perhaps 3 possible approaches you can take,
  1. Do some pre-analysis and find a subspace of values for the parameters theta that implies these bounds on z.
  2. Choose f() to be of a form that is innately and globally bounded, e.g., z=arctan(g(x,y;theta))/pi + 0.5. This is the most common approach when f(x,y,theta) must satisfy bounds over a continuum of x and y.
  3. Use fmincon() or ga() instead of fit(). You can define any constraints you want in those solvers, in particular 0<=f(x,y; theta)<=1. The problem is that this constraint will often correspond to disjoint, non-connected regions in the feasible parameter space theta. It can be hard for the solvers to find global minima over non-connected feasible sets.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

질문:

2018년 7월 24일

편집:

2018년 7월 24일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by