Identify two coordinates on the X-axis and Y-axis of a 3D object

1 view (last 30 days)
Hello! I should retrieve the outermost coordinates on the XY plane of a 3D object.
In detail:
I have a 3D object -> I display it on the XY plane -> on this XY plane I want to determine the outermost coordinates:
  • two coordinates on the X axis (one on the left and one on the right)
  • two coordinates on the Y axis (one above and one below)
data = importdata("NODES_finger_1.txt");
figure
plot3(data(:,1),data(:,2),data(:,3),'k.','Markersize',10)
grid on
xlabel('x')
ylabel('y')
zlabel('z')
view([15,50,30])

Accepted Answer

Matt J
Matt J on 29 Dec 2022
Edited: Matt J on 29 Dec 2022
[x,y]=deal(data(:,1),data(:,2));
[~,xmin]=min(x);
[~,xmax]=max(x);
[~,ymin]=min(y);
[~,ymax]=max(y);
points = data([xmin,xmax,ymin,ymax],1:2)

More Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!