MATLAB, draw tolerances in a plot similar to errorbar in matlab, but perpendicular to points in the curve.

6 ビュー (過去 30 日間)
I have two arrays time and output, and I want the tolerances to be shown on a plot. I know that errorbar(time,output,err) does this in matlab, but I want the bars to be perpendicular to the point in the curve. errorbar only provides horizontal or vertical bars.

回答 (1 件)

John D'Errico
John D'Errico 2023 年 11 月 4 日
編集済み: John D'Errico 2023 年 11 月 4 日
You can want code to do as you want, but it won't help. And there is no version of errorbar that will do as you want. This means you will need to write the code yourself.
That means you need to compute the normal vector to the curve at any point.
Then compute the length of those error bars. I'm not entirely sure how you have chosen to compute such a perpendicular error bar, but this is your project, not mine.
Finally, plot them yourselves, using your own code. You can use tools like patch at this point.

カテゴリ

Help Center および File ExchangeErrorbars についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by