Surface Plot with 3 vectors

조회 수: 12 (최근 30일)
Bhar_tex
Bhar_tex 2018년 2월 21일
댓글: Giorgo Kapino 2019년 4월 11일
To plot 3 vectors A,B & C, I have used surf plot. I have noticed there is a syntax error in my code below. When I select the columns from the variables and used the plots on the Menu bar...the surface plot popped up but the axis limits are not matching with my data? I appreciate your suggestions.
A=data(1:78,1); B=data(1:78,2); C=data(1:78,3); surf(A,B,C)

채택된 답변

KSSV
KSSV 2018년 2월 21일
data = importdata('data.txt') ;
x = data(:,1) ; y = data(:,2) ; z = data(:,3) ;
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
xi = dt.Points(:,1) ;
yi = dt.Points(:,2) ;
F = scatteredInterpolant(x,y,z);
zi = F(xi,yi) ;
trisurf(tri,xi,yi,zi)
view(2)
shading interp
  댓글 수: 4
Bhar_tex
Bhar_tex 2018년 3월 1일
Can I get a fit function/equation for this un-well sampled data?
Giorgo Kapino
Giorgo Kapino 2019년 4월 11일
You can perhaps try cftool

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by