How to create helical sinusoidal plot in matlab
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
NIHAD NAJEEB
el 6 de Nov. de 2021
Respondida: Chunru
el 6 de Nov. de 2021
I want this plot
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/791579/image.png)
By using the below code I obtained the result as shown
dh = 0.5;
a = 42;
h = 20;
R = 45;
N = h/dh;
m = 1;
for n = 0:1:360*N
z(m)= 0-((dh/360)*n);
r = R -(((dh/360)*n)/tand(a));
x(m)=(r)*cosd(n);
y(m)=(r)*sind(n);
m = m+1;
end
plot3(x,y,z,'b')
axis equal
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/791584/image.png)
What changes should I do ?
0 comentarios
Respuesta aceptada
Chunru
el 6 de Nov. de 2021
Is this what you want?
dh = 2; %0.5; % adjust this to see more detains
a = 42;
h = 20;
R = 45;
N = h/dh;
m = 1;
for n = 0:1:360*N
z(m)= 0-((dh/360)*n) + .4*cosd(60*n); % add oscilation about z
r = R -(((dh/360)*n)/tand(a));
x(m)=(r)*cosd(n);
y(m)=(r)*sind(n);
m = m+1;
end
plot3(x,y,z,'b')
axis equal
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!