MATLAB Answers

How to fit a monotonically increasing map to a certain data?

4 views (last 30 days)
Tokdemir Ibrahim Kerem
Tokdemir Ibrahim Kerem on 7 Apr 2020
Assume that I have data, x,y,z all of them are 1xN double. I want to fit a surface with fit([x,y],z,FitType). I want my surface to increase monotonically in x and y. How can I achive this?
Thanks for any advice in advance.

  0 Comments

Sign in to comment.

Answers (1)

darova
darova on 8 Apr 2020
Try
f = fit([x(:) y(:)],z(:),'poly11');
% or manually
% f = fit([x(:) y(:)],z(:),'a*x+b*y+c');

  1 Comment

Tokdemir Ibrahim Kerem
Tokdemir Ibrahim Kerem on 9 Apr 2020
Thank you for your answer. I want to minimize R-square as well. Poly11 will have a very low R-square I guess.

Sign in to comment.

Sign in to answer this question.


Translated by