Effacer les filtres
Effacer les filtres

Matlab is not plotting

3 vues (au cours des 30 derniers jours)
Mahmoud Abbas
Mahmoud Abbas le 8 Mar 2022
Modifié(e) : KSSV le 8 Mar 2022
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

Réponse acceptée

KSSV
KSSV le 8 Mar 2022
Modifié(e) : KSSV le 8 Mar 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,'.-')

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by