plot of theta_new and cos theta
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Offroad Jeep
el 30 de En. de 2016
Respondida: Walter Roberson
el 30 de En. de 2016
clc
clear
format compact
nmc = 1000
theta_initial = 0
% b = ones(2)
for i = 1:nmc
a = round (rand(1)-0.3)
theta_new = a + theta_initial
if theta_new(1,1) > theta_initial(1,1)
theta_initial = theta_new
plot(theta_new,cos(theta_new),'*')
if theta_initial >= 90
break
end
end
end
plot(theta_new,cos(theta_new),'*')
how i can correct for plotting theta_new and its cos(theta_new)
0 comentarios
Respuesta aceptada
Walter Roberson
el 30 de En. de 2016
After the first
plot(theta_new,cos(theta_new),'*')
add
hold on
and remove the second plot() call.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Audio I/O and Waveform Generation 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!