I have three lists of data listed in the workspace in tables that are 8000x1 that will be x, y, and z for the plot I want to make. How can I use these three to create a 3D plot? plot3 and scatter three return these errors:
"Error using scatter3 (line 59) Input arguments must be numeric, datetime, duration or categorical.
Error in PlottingData (line 1) scatter3(x1,y1,z1)"
What should I use to plot this?

4 commentaires

Adam
Adam le 17 Juil 2017
I've never really used tables, but can't you just extract the relevant columns into numeric arrays?
Sarah Weatherly
Sarah Weatherly le 17 Juil 2017
How do you do that?
Adam
Adam le 17 Juil 2017
Well, as I said, I don't use tables, but it seems like a basic operation
This page may help.
John
John le 17 Juil 2017
table2array() will get that done. If your table has non-numeric values and numeric values, apply table2array() just on the subset that is numeric.

Connectez-vous pour commenter.

 Réponse acceptée

Walter Roberson
Walter Roberson le 17 Juil 2017
If your x1, y1, z1 are tables with a single variable, then
scatter3(x1{:,1}, y1{:,1}, z1{:,1})

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by