Very beginner question: plot excel via scatter3d but getting error
Mostrar comentarios más antiguos
Hi there, I've tried to plot a set of data (188 points from a table 188*3) using scatter3d, and codes are below.
x=data01(:,1);
y=data01(:,2);
z=data01(:,3);
scatter3(x,y,z);
and my x value is a list of 188 numbers of x-coordinate(purely number), and it is a table with 188*1.
It is very simple, but I continued got error saying 'input arguments must be numeric, datetime, duration or categorical'. I cannot find solution...and it kills half of my day..would somebody like to help? Thanks.
Respuesta aceptada
Más respuestas (1)
Star Strider
el 21 de Mayo de 2017
You need to use cell array addressing.
This works:
figure(1)
scatter3(data01{:,1}, data01{:,2}, data01{:,3})
Note the curly braces ‘{}’ denoting cell array addressing.
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!