Identify local minima in 3D plot/coordinate data

16 ビュー (過去 30 日間)
pkll201
pkll201 2024 年 4 月 3 日
コメント済み: Mathieu NOE 2024 年 4 月 3 日
I have some coordinate data, and I am trying to find the points as described on this graph with arrows:
I am trying to find the point in the coordinate data in the 3D plot as it is not always clear when looking at just the vertical plots. I honestly can't get my head around it conceptually what I should do. Does anyone have any ideas on how I should approach this task? I have attached some example data with X,Y,Z position data in columns 1,2,3 respectively.

採用された回答

Mathieu NOE
Mathieu NOE 2024 年 4 月 3 日
hello
this is what you need :
try this
load('sampledata.mat')
x = sampledata(:,1);
y = sampledata(:,2);
z = sampledata(:,3);
% coordinates of the local minima
TF = islocalmin(z,'MinSeparation',100, 'MinProminence', 5);
xlm = x(TF);
ylm = y(TF);
zlm = z(TF);
plot3(x,y,z)
hold on
plot3(xlm,ylm,zlm,'r*')
  2 件のコメント
pkll201
pkll201 2024 年 4 月 3 日
Thank you, this works great!
Mathieu NOE
Mathieu NOE 2024 年 4 月 3 日
glad I could help !
have a good day !

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by