light_way.m
来自「《matlab使用详解》的部分源码」· M 代码 · 共 43 行
M
43 行
h0=figure('toolbar','none',... %设置句柄属性值
'position',[200 150 450 350],...
'name','例子');
subplot(2,2,1) %子图1中绘制球
sphere
shading flat %设置光照效果
camlight left
camlight right
lighting flat
colorbar
axis off %隐藏坐标轴
title('Figure1')
subplot(2,2,2)
sphere
shading flat
camlight left
camlight right
lighting gouraud
colorbar
axis off
title('Figure2')
subplot(2,2,3)
sphere
shading interp
camlight right
camlight left
lighting phong
colorbar
axis off
title('Figure3')
subplot(2,2,4)
sphere
shading flat
camlight left
camlight right
lighting none
colorbar
axis off
title('Figure4')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?