Decision Branching, modification Script
조회 수: 82 (최근 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에서 Graphics Object Programming에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!