How to a plot a surface from excel sheet XYZ
17 ビュー (過去 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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/791479/image.png)
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 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!