MATLAB: How to plot the lower or upper boundary lines for scatter data

scatter plot boundary lineyongnuan liu

I have a scatter plot. I'd like to plot the lines connecting the points either the upper or lower bound.
How to do it?
Could you please help? Thank you so much.

Best Answer

You could use boundary() to help figure out which points are on the perimeter. Figuring out which of those points are on the upper or lower branch might take some thinking for irregular point distributions.