How to a plot a surface from excel sheet XYZ
13 次查看(过去 30 天)
显示 更早的评论
I have an excel sheet (attached) and I want to plot a smooth XYZ surface from this data.
IMPORTANT NOTE:
Originally, both X & Y go from 0 to 0.5. However, some points were outliers and I needed to remove them, so I ended up with this data.
This is a screenshot:
0 个评论
采纳的回答
KSSV
2021-11-6
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/791474/excel-surface.xlsx')
x = T.(1) ;
y = T.(2) ;
z = T.(3) ;
xi = linspace(min(x),max(x));
yi = linspace(min(y),max(y)) ;
[X,Y] = meshgrid(xi,yi) ;
Z = griddata(x,y,z,X,Y) ;
pcolor(X,Y,Z)
shading interp
colorbar
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!