Matlab is not plotting

2 ビュー (過去 30 日間)
Mahmoud Abbas
Mahmoud Abbas 2022 年 3 月 8 日
編集済み: KSSV 2022 年 3 月 8 日
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

採用された回答

KSSV
KSSV 2022 年 3 月 8 日
編集済み: KSSV 2022 年 3 月 8 日
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,'.-')

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by