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

### Faezeh Manesh (view profile)

on 19 Jul 2019
Latest activity Commented on by Image Analyst

### Image Analyst (view profile)

on 21 Jul 2019
Hello,
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?

Image Analyst

### Image Analyst (view profile)

on 21 Jul 2019
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?
Walter Roberson

### Walter Roberson (view profile)

on 21 Jul 2019
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.
Image Analyst

on 21 Jul 2019
Convex hull?

on 21 Jul 2019
Edited by Matt J

### Matt J (view profile)

on 21 Jul 2019

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