Matlab中的这条语句什么意思啊?

2025-02-28 19:32:52
推荐回答(1个)
回答1:

你可以先运行一下下面的代码
____________________________________________
%shading模式演示
[x,y]=meshgrid(-4:0.5:4);
z=x.^2+2*sin(x*pi)+cos(y*pi);
subplot(2,2,1)
surf(x,y,z)
title('no shading');
subplot(2,2,2)
surf(x,y,z)
shading flat
title('shading flat')
subplot(2,2,3)
surf(x,y,z)
shading faceted
title('shading faceted')
subplot(2,2,4)
surf(x,y,z)
shading interp
title('shading interp')
_____________________________________________________________

shading 是用来处理色彩效果的,分以下三种:
no shading 一般的默认模式 即shading faceted
shading flat 在faceted的基础上去掉图上的网格线
shading interp 在flat的基础上进行色彩的插值处理,使色彩平滑过渡