Optimization of two linear models with constraint

1 次查看(过去 30 天)
I have a dataset which is a 'v-shaped' pattern of dots: y_observed and want to adjust two linear regressions with a turning point TP so that a cost function minimices the errors for the to models, y_calc1=m1*x(1:TP)+b1, y_calc2=m2*x(TP:end)+b2 AND y_calc1(TP)=y_calc2(TP).
Can somebody help me with this? its a simple 'fmincon' problem

采纳的回答

Matt J
Matt J 2012-10-6
This should be applicable.
What you describe is a first order spline with a single free knot.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Quadratic Programming and Cone Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by