3D smooth plot in Matlab from excel imported data

Hi, I imported data from Excel worksheet using xlsread function. I did a 3D plot using the data. I used trisurf, but I want a smooth curve. How can I convert my plot into a smooth plot? I attached the screenshot of my excel data and 3D plot. Here is the code I wrote for the plot:
dataset = xlsread('scan2_Laser.xlsx','Sheet1', 'B2:E1738');
x = dataset(:,1);
y = dataset(:,3);
z = dataset(:,4);
tri = delaunay (x,y);
trisurf(tri,x,y,z);
title ('3D Plot scan 3 20mA Laser Power');
xlabel ('x position');
ylabel ('y position');
zlabel ('APD Current');
Any kind of help will be appreciated. Thanks in advance.

回答 (1 件)

KSSV
KSSV 2017 年 8 月 10 日

0 投票

YOu need to increase the data points in order to smooth it....you need to have a look into griddata, scatteredinterpolant.

2 件のコメント

Nabila Tabassum
Nabila Tabassum 2017 年 8 月 10 日
Hi KSSV, FYI my z is not a function of x and y. x, y and z are collected data's from one test. so I want to plot z vs x and Y. in that case griddata, scatteredinterpolant will work?
Walter Roberson
Walter Roberson 2017 年 8 月 10 日
scatteredInterpolant is appropriate for this situation.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeSmoothing についてさらに検索

質問済み:

2017 年 8 月 10 日

コメント済み:

2017 年 8 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by