heatmap function inside a for loop only display the last graph

4 次查看(过去 30 天)
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?

采纳的回答

Chunru
Chunru 2021-6-26
Create new figure in loop:
for i = 3:5
figure
heatmap(magic(i))
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by