Hello,
I have a n by 3 single array. As I want to plot just the x and y data, I need to delete the z column in that array. Could you please tell me how that is done?
Thanks in advance!
Lucca

 채택된 답변

Dima Lisin
Dima Lisin 2015년 11월 2일

0 개 추천

You do not have just an array of points. You have one pointCloud object, which contains an array of x,y,z coordinates in the Location property. So you can do this:
array = ptCloud.Location(:, 1:2);

댓글 수: 1

lucca k
lucca k 2015년 11월 2일
Thank you this works, but in the array there are 480 x and y values now. Before there have been 80 000. Do you know why?

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Adam
Adam 2015년 11월 2일

0 개 추천

array = array(:,1:2);
or
array(:,3) = [];

댓글 수: 3

lucca k
lucca k 2015년 11월 2일
it doesnt work as my array is of class 'pointcloud'
Adam
Adam 2015년 11월 2일
편집: Adam 2015년 11월 2일
I am not familiar with 'PointCloud', but I assume it is a class that is used for 3d point representations so just throwing away the 3rd column would not work in that case.
You need to give more information about what pointCloud is and the structure of your array for that case.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Color and Styling에 대해 자세히 알아보기

질문:

2015년 11월 2일

댓글:

2015년 11월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by