3D surface plot question
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I would like to plot the following data as a 3D plot (showing just the first column), where 1st column is X, 2nd is Y and 3rd is Z. Does anybody know how would I do that?
0.66455 -0.03190 14.50000
Thanks
Tarsis
댓글 수: 0
채택된 답변
Star Strider
2014년 7월 21일
편집: Star Strider
2014년 7월 21일
For your data, I would use the scatter3 function. If you want to do a surface fit, see the documentation for Scattered Data Interpolation.
댓글 수: 3
Star Strider
2014년 7월 21일
My pleasure!
For scatter3, you define them exactly that way:
scatter3(X, Y, Z)
See the documentation for scatter3 (that I provided a link to in my original Answer) for details. You can change the marker type and other options.
If you want a bit more relevant 3D representation (still discrete data and not a surface), you can also use the stem3 function. You would call it the same way:
stem3(X, Y, Z)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!