Decision Branching, modification Script

Modify the script so that the plotting code on lines 4-7 are executed only when doPlot is 1.
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")

1 件のコメント

bhuvan lekkala
bhuvan lekkala 2021 年 11 月 10 日
this is correct

 採用された回答

Dhruv G
Dhruv G 2021 年 7 月 5 日

1 投票

if doPlot
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end

その他の回答 (0 件)

This question is locked.

カテゴリ

製品

タグ

質問済み:

2021 年 7 月 5 日

Locked:

DGM
2024 年 8 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by