Plotting every nth point from a table for a scatter3 plot

조회 수: 10 (최근 30일)
Kaylyn Bellais
Kaylyn Bellais 2020년 3월 21일
댓글: Star Strider 2020년 3월 21일
Hi,
I am using a scatter3 to plot easting, northing and elevation data from a text file loaded in as a table. I have 1,520,371 points but only wish to plot every 10th point. Is there a function that will allow me to do this? Thanks in advance!

채택된 답변

Star Strider
Star Strider 2020년 3월 21일
If I understand correctly what you want to do, this should work:
x = rand(1520371,1); % Create Data
y = rand(1520371,1); % Create Data
z = rand(1520371,1); % Create Data
T = table(x, y, z); % Create Table
plot3(T{1:10:end,1}, T{1:10:end,2}, T{1:10:end,3})
grid on
The approach will be the same even if the vector sizes are incorrect here.
  댓글 수: 4
Kaylyn Bellais
Kaylyn Bellais 2020년 3월 21일
Thank you so much, Star!
That absolutely worked.
Star Strider
Star Strider 2020년 3월 21일
My pleasure!
If my Answer helped you solve your problem, please Accept it!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by