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 Center および File ExchangeData Type Identification についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by