Borrar filtros
Borrar filtros

plotting all indices in a for loop

1 visualización (últimos 30 días)
shobhit mehrotra
shobhit mehrotra el 4 de Sept. de 2014
Respondida: Star Strider el 4 de Sept. de 2014
i have this code
for n=1:35
A = sin(n*3)
B= cos(n^2)*3))
plot (A,B)
end
however when i plot it only plots the last point, how can i plot all of the points in the array?

Respuesta aceptada

Star Strider
Star Strider el 4 de Sept. de 2014
This should work:
for n=1:35
A(n) = sin(n*3)
B(n) = cos(n^2)*3))
plot (A,B)
end

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by