How to find the maximum distance between two curves?

17 ビュー (過去 30 日間)
Daniel Tanner
Daniel Tanner 2019 年 12 月 30 日
コメント済み: Vladimir Sovkov 2019 年 12 月 30 日
Hi, I would like to be able to calculate the maximum distance between two curves, is there a simple way of doing this without purchasing one of MatLab's add ons? I have attached a copy of the two curves for reference.
Any help is greatly appreciated, thanks!untitled.png

採用された回答

Vladimir Sovkov
Vladimir Sovkov 2019 年 12 月 30 日
(1) Specify, what do you mean by the distance between curves. If this is the distance between any points of them, a special (though not very much complicated) program is needed; if this is the vertical distance-see the following comments.
(2) If you have the curves as the numeric vectors y1, y2 of the same size presnted at the same common grid x, the maximum vertical distance is just
max(abs(y1-y2))
If the grids differ, address the interp1 function to recast them to the common grid preliminary.
(3) If you only have the curves as pictures, use the digitizing software to turn them into the numeric form. There are a lot of such programs, e.g., DigBit at https://www.mathworks.com/matlabcentral/fileexchange/73785-digbit
  2 件のコメント
Daniel Tanner
Daniel Tanner 2019 年 12 月 30 日
Ah yes, I understand my explanation was not quite sufficient before. Ideally I would like to know the maximum horizontal distance between two points?
Vladimir Sovkov
Vladimir Sovkov 2019 年 12 月 30 日
In my explanation, turn the word "vertical" to "horizontal" or, alternatively, rotate your image by -90 degrees.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by