Why is "hold on" not working?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
I am trying to plot multiple helices on 1 graph but I cannot seem to figure it out. Below is my code...
clc;
clear all;
close all;
n = input('number of turns');
a = input('radius');
P = input('pitch angle');
t = 0:pi/50:n*2*pi;
b = a*a*tan(P);
x = a*sin(t);
y = a*cos(t);
z = b*t;
r = 5:pi/50:n*2*pi;
b = a*a*tan(P);
x2 = a*sin(r);
y2 = a*cos(r);
z2 = b*r;
figure(1)
plot3(x,y,z, 'red')
hold on;
figure(2)
plot3(x2,y2,z2, 'blue')
hold off;
Respuesta aceptada
Más respuestas (0)
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!