Select only those nodes of an rx3 matrix placed at a distance 'd' from a node P (1x3)

1 回表示 (過去 30 日間)
Alberto Acri
Alberto Acri 2023 年 9 月 27 日
コメント済み: Voss 2023 年 9 月 28 日
Hi! Is there any way to extract the coordinates of the nodes of the similar circle on the left?
I had thought of something related to the distance 'd' between one node and another of the similar circle but there are nodes that may be at a greater distance from the set 'd' (see nodes A and B). So, using this procedure, it would be necessary first to add nodes between A and B for example. Any methods that could be used?
load M
P = [25.9349 -15.0445 77.3427];
figure
plot3(P(:,1),P(:,2),P(:,3),'k.','Markersize',20);
hold on
plot3(M(:,1),M(:,2),M(:,3),'r.','Markersize',10);
hold off
axis equal

採用された回答

Voss
Voss 2023 年 9 月 27 日
load M
figure
plot3(M(:,1),M(:,2),M(:,3),'r.')
view(2)
% keep only points whose x-coordinate is less than 28:
idx = M(:,1) < 28;
M = M(idx,:);
figure
plot3(M(:,1),M(:,2),M(:,3),'r.')
  11 件のコメント
Alberto Acri
Alberto Acri 2023 年 9 月 28 日
Ok thanks for the help @Voss! This solution might be the most useful.
Voss
Voss 2023 年 9 月 28 日
You're welcome!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by