logo.m
来自「初学者可以参考一下 作为MATLAB的入门教程与实践」· M 代码 · 共 45 行
M
45 行
%LOGO Plot the L-shaped membrane logo with MATLAB 5 lighting.
% Copyright (c) 1984-98 by The MathWorks, Inc.
% $Revision: 5.12 $ $Date: 1998/09/29 16:15:48 $
if exist('GalleryGUIFlag'), close(figNumber), end;
infoStr = str2mat(' ', ...
' This is the MathWorks logo, the fundamental mode', ...
' for wave propogation on an L-shaped domain.', ...
' ', ...
' File name: logo.m');
% gallinit(figNumber,infoStr)
L = 40*membrane(1,25);
figure('Color',[0 0 0]);
axes('CameraPosition', [-193.4013 -265.1546 220.4819],...
'CameraTarget',[26 26 10], ...
'CameraUpVector',[0 0 1], ...
'CameraViewAngle',9.5, ...
'DataAspectRatio', [1 1 .9],...
'Position',[0 0 1 1], ...
'Visible','off', ...
'XLim',[1 51], ...
'YLim',[1 51], ...
'ZLim',[-13 40]);
s = surface(L, ...
'EdgeColor','none', ...
'FaceColor',[0.8 0.2 0.2], ...
'FaceLighting','phong', ...
'AmbientStrength',0.3, ...
'DiffuseStrength',0.6, ...
'Clipping','off',...
'BackFaceLighting','lit', ...
'SpecularStrength',1.1, ...
'SpecularColorReflectance',1, ...
'SpecularExponent',7);
l1 = light('Position',[40 100 20], ...
'Style','local', ...
'Color',[0 0.7 0.7]);
l2 = light('Position',[.5 -1 .4], ...
'Color',[1 1 0]);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?