MATLAB Answers


How to fit some curves to one curve in which only the maximum of curves are fitted?

Asked by Faezeh Manesh on 19 Jul 2019
Latest activity Commented on by Image Analyst
on 21 Jul 2019
Actually I need to fit some curve to one curve in a way that the maximum of those curves are fitted to the main curve. Could you please help me with this problem?


What you drew does NOT match what you said. For example, in between the humps, the blue line is not the sum of the red curves, nor is it the max of any of the red curves. Plus. on the right hand side, your blue curve is well above any of the 3 red curves. Why is the blue curve so high there? What if you just say
y = y1 + y2 + y3;
Where the y are the three different red curves. Does that do what you want?
It looks to me as if the peaks are to be taken along with their location, and that then a curve is to be fitted to those locations. Except it doesn't look like a polynomial to me, and it is not obvious what the model curve would be.

Sign in to comment.

1 Answer

Answer by Matt J
on 21 Jul 2019
Edited by Matt J
on 21 Jul 2019

Generate the maximum of all your curves and use alphashape() to smooth over concavities in its envelope.


Sign in to comment.