Rotate function

The function Rotatefxn3D is a numerical analogy of the Maple rotating function Rotate
87.0 次下载
更新时间 2015/11/10

查看许可证

% The function Rotatefxn3D is a numerical analogy of the Maple rotating
% function Rotate. It generates the X,Yand z coodinates to be used by the
% surf function to generate the required surface, just like the matlab
% function cylinder does.

% fxn is the function to be rotated
% axis is the axis of rotation eg 'x','y','z'
% xbound is the range of values of x
% arcbound is the bound of angle of rotation
% Nx is the number of step in x direction
% Na is the number of angular steps

Eample1:
[X,Y,Z] = Rotatefxn3D(@(t) sin(t),'x',[0,10],40,[0,2*pi],20);
s = surf(X,Y,Z); set(s,'FaceColor','r'); axis equal
camlight
lighting gouraud
title('Rotatefxn3D(@(t) sin(t),''x'',[0,10],40,[0,2*pi],20)')

Example2:
[X,Y,Z] = Rotatefxn3D(@(t) sin(t),'z',[0,10],20,[0,2*pi],40);
s = surf(X,Y,Z); set(s,'FaceColor','r'); axis equal
camlight
lighting gouraud
title('Rotatefxn3D(@(t) sin(t),''z'',[0,10],20,[0,2*pi],40)')

引用格式

Lateef Adewale Kareem (2024). Rotate function (https://www.mathworks.com/matlabcentral/fileexchange/53908-rotate-function), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Lighting, Transparency, and Shading 的更多信息
标签 添加标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0