How to determine concavity point?

11 ビュー (過去 30 日間)
Ali Almakhmari
Ali Almakhmari 2023 年 5 月 8 日
編集済み: John D'Errico 2023 年 5 月 8 日
I have a bunch of data that when plotted look similar to this:
I want to know how I can use MATLAB to determine the corner or vertex or sometimes called concavity point (there are two in this plot that I have, one in the red data and one in the blue data)?

採用された回答

John D'Errico
John D'Errico 2023 年 5 月 8 日
編集済み: John D'Errico 2023 年 5 月 8 日
You give no data, so I'll need to make some up for an example.
x = linspace(-30,30,500);
y = cumsum((atan(x - 10)/2 + 1));
plot(x,y)
grid on
So a simple enough curve. Can we locate the point where there is a change? As long as the stride between points is constant, then a tool like findchangepts might help.
ipt = findchangepts(y,'Stat','linear')
ipt = 331
[x(ipt),y(ipt)]
ans = 1×2
9.6794 88.9733
hold on
plot(x(ipt),y(ipt),'ro')

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by