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

3 vues (au cours des 30 derniers jours)
Tokdemir Ibrahim Kerem
Tokdemir Ibrahim Kerem le 7 Avr 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.

Réponses (1)

darova
darova le 8 Avr 2020
Try
f = fit([x(:) y(:)],z(:),'poly11');
% or manually
% f = fit([x(:) y(:)],z(:),'a*x+b*y+c');
  1 commentaire
Tokdemir Ibrahim Kerem
Tokdemir Ibrahim Kerem le 9 Avr 2020
Thank you for your answer. I want to minimize R-square as well. Poly11 will have a very low R-square I guess.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by