Reputation: 21
I have an unstructured dataset "nm", excel file in the link below.
https://www.dropbox.com/s/k7sdblxg4txjvj8/nm.xls?dl=0
it looks like that in a Mathematica list plot 1.
Could You please help me extracting upper bound envelope of this dataset, similar to the red line marked in picture 2? By extracting an envelope I mean to make another list "nm2" that for a given n produces a maximum m? I need another list "nm2" because then i need to work with it in excel.
Best Regards, BG
Upvotes: 2
Views: 253
Reputation: 8655
Using a technique found here : obtain all boundary points on a convex hull
data = Import["nm.xls"];
chr = ConvexHullRegion[data];
sr = SignedRegionDistance[chr];
dist = sr /@ data;
points = Extract[data, Position[dist, 0.]];
{maxx, maxy} = Max /@ Transpose[data];
minx = First[FirstCase[points, {_, maxy}]];
miny = Last[FirstCase[points, {maxx, _}]];
arc = Select[points, First[#] >= minx && Last[#] >= miny &];
f = Interpolation[arc];
Show[ListPlot[data], Plot[f[x], {x, minx, maxx},
PlotStyle -> {Thick, Red}]]
Upvotes: 0