How to make matlab plot this (it shows an empty graph)
for i=1:10
M=1+i;
plot(i,M,'LineWidth',2)
hold on
end

 Respuesta aceptada

KSSV
KSSV el 8 de Mzo. de 2022
Editada: KSSV el 8 de Mzo. de 2022
As you are plotting a point, you need to use marker.
for i=1:10
M=1+i;
plot(i,M,'.','MarkerSize',5)
hold on
end
You can also plot all at once. Using:
i = 1:10 ;
M = i+1;
figure
plot(i,M,'.-')

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Etiquetas

Preguntada:

el 8 de Mzo. de 2022

Editada:

el 8 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by