image thumbnail
from MatLab Course Part-1 (AR.) by GAMAL ALKIRSHI
This is my Matlab's course in Taiz university\Yemen, it is good for students and every one who wan

cylandseph.m
clear all;close all;clc;
r=1;
N=50;
dth=pi/100;
theta=0:dth:2*N*pi;
x=r*cos(theta);
y=r*sin(theta);
z=-(length(x)-1):2:(length(x)-1);
plot3(x,y,z,'k')
hold on

dphi=pi/100;
phi=0:dphi:2*N*pi;
r=1; % sphere of radius 1
theta=phi/N/2;

%Convert Spherical to Cartesian
x=r*sin(theta).*cos(phi);
y=r*sin(theta).*sin(phi);
z=1.e4*r*cos(theta);

plot3(x,y,z,'.r')

Contact us at files@mathworks.com