필터 지우기
필터 지우기

How to 3D plot data points in matlab?

조회 수: 13 (최근 30일)
Sarah Weatherly
Sarah Weatherly 2017년 7월 17일
댓글: Sarah Weatherly 2017년 7월 18일
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
Adam
Adam 2017년 7월 17일
Well, as I said, I don't use tables, but it seems like a basic operation
This page may help.
John
John 2017년 7월 17일
table2array() will get that done. If your table has non-numeric values and numeric values, apply table2array() just on the subset that is numeric.

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

채택된 답변

Walter Roberson
Walter Roberson 2017년 7월 17일
If your x1, y1, z1 are tables with a single variable, then
scatter3(x1{:,1}, y1{:,1}, z1{:,1})
  댓글 수: 1
Sarah Weatherly
Sarah Weatherly 2017년 7월 18일
Worked well! Thank you very much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by