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 日

10 投票

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 年 2 月 21 日
編集済み: Bhar_tex 2018 年 2 月 21 日
Thanks for your prompt response.
initially it throws error on your code and I have changed it to x = data.data(:,1) ; y = data.data(:,2) ; z = data.data(:,3) ;
then error on line dt = delaunayTriangulation(x,y) ; as undefined function
I am using Matlab 2012b version with signal & image toolboxes. Not sure if this function shall be used with a specific toolbox installed?
KSSV
KSSV 2018 年 2 月 21 日
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 件)

カテゴリ

質問済み:

2018 年 2 月 21 日

コメント済み:

2019 年 4 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by