Decision Branching, modification Script
54 次查看(过去 30 天)
显示 更早的评论
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)")
2 个评论
Muhammad Mansoor khan
2022-9-7
Reenter this code
if doPlot == 1
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
回答(9 个)
Dhruv G
2021-7-5
if doPlot
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
KAPIL DEV YADAV
2022-6-10
if doPlot==1
plot(5,8)
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
Harshada Pawar
2022-1-9
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
0 个评论
Thameemul Ansari Kaja
2022-1-17
if doPlot==1
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
Samuel Kwesi Tandoh
2022-3-30
if doPlot==1
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
chaymae saibari
2022-4-3
if doPlot==1
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
Hashim Albasher
2023-2-1
if doPlot == 1
plot(density)
title("Sample Densities")
xticklabels(element)
ylabel("Density (g/cm^3)")
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!