heatmap function inside a for loop only display the last graph

I'm using the heatmap function inside a livescript and my code loos like this
for i = 1:10
heatmap(M)
end
but the output only contains the 10th graph, is there a way to keep all graphs in the output?

 채택된 답변

Create new figure in loop:
for i = 3:5
figure
heatmap(magic(i))
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2021년 6월 26일

댓글:

2021년 6월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by