how to make a boundary using percentile?
1 view (last 30 days)
i have trajectory data(longitude, latitude, altitude).
what i want to make is a boundary(second image). the boundary is made from mean trajectory using 'percentile'.
for example, if percentile is 100, the boundary includes every trajectory.
(In my case, the percentile will be 97.5.)
as you can see in third image, I can make a boundary with two elements(longitude, latitude). but my problem with making a boundary is that i have to consider three elements(longitude,latitude,altitude).
and the number of boundaries shoulde be the number of data. (if one trajectory data has 12 longitude, 12 latitude, 12 altitude data, the number of boundaries is 12 like second image.)
let me know how to make a boundary with three elements using 'percentile'.
Star Strider on 25 May 2022
This uses the prctile function —
x = rand(1,1000)*10+125;
y = randn(1,1000)*50+250;
xpctl = prctile(x,[2.5 97.5])
ypctl = prctile(y,[2.5 97.5])
patch([xpctl flip(xpctl)], [[1 1]*ypctl(1) [1 1]*ypctl(2)], 'r', 'FaceAlpha',0.25)
Make appropriate changes to work with your data.