surface from scatter 3 plot

조회 수: 216 (최근 30일)
Ilias Minas
Ilias Minas 2019년 7월 22일
답변: SaiDileep Kola 2019년 7월 29일
Hi,
I have the following scatter graph using the commant scatter 3
My x axis is a column vector 3042x1 (utuvals 0-0.6)
my y axis is a column vector 3042x1 (mppvalsco 1.3-2.1)
and z axis is a column vector 3042x1 (vectorrealcolum)
How can i convert the scatter plot to surface plot with the point appearing on it?
Thank you
  댓글 수: 1
darova
darova 2019년 7월 22일
Read about griddata()

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

채택된 답변

SaiDileep Kola
SaiDileep Kola 2019년 7월 29일
[xq,yq] = meshgrid(-2:.2:2, -2:.2:2);
vq = griddata(x,y,v,xq,yq); %(x,y,v) being your original data for plotting points
mesh(xq,yq,vq)
hold on
plot3(x,y,v,'o')
xlim([-2.7 2.7])
ylim([-2.7 2.7])
You get the surface plot with points appearing on it, using the above code. You may also refer to the documentation at https://www.mathworks.com/help/matlab/ref/griddata.html

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by