How to plot standard dev. from a closed-loop trajectory
显示 更早的评论
Hello, I am trying to plott the standard deviation of the X and Y points of a trajectory (T) obtained as a mean of different trajectories. So far I have tried the the easy-way-out that was adding and subtracting the sd to the mean of T and plotting those:
T = plot(x, mean_y, 'Color', 'k', 'LineWidth', 2);
sd = plot(x, [mean_y - 2*std_y; mean_y + 2*std_y], 'Color', 'r');
However, this doesn't work when you have a closed loop.
My second idea was to get the tangent of each point in my plot through the differential of my plot, and obtain each point on the tangent of this derivetive at a distance of sd. However I am not 100% sure of how to implement this. So far I have:
der_x = diff(R_avg_z)./diff(R_avg_x) %tangent of the curve
I would trully appreciate some help with this as this is not my field of expertiese.
Thank you
Alonso
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

