From: Neil Fleming on
I have a problem, I'm looking to fit a spline to data points that increases non-uniformly in X as Y increases. However, want to constrain the fitted curve to have either a gradient greater than or equal to zero over the entire range of Y.

Any suggestions?
From: Mark Shore on
"Neil Fleming" <neil.fleming(a)oba.NOSPAM.co.uk> wrote in message <hruo9p$oes$1(a)fred.mathworks.com>...
> I have a problem, I'm looking to fit a spline to data points that increases non-uniformly in X as Y increases. However, want to constrain the fitted curve to have either a gradient greater than or equal to zero over the entire range of Y.
>
> Any suggestions?

Two. First, phrase your problem more clearly. What does "increases non-uniformly in X as Y increases" mean?

Second, if you have the optimization toolbox, consider John D'Errico's SLM tools: http://www.mathworks.com/matlabcentral/fileexchange/24443-slm-shape-language-modeling