subplot in loop and save final figure, when clear all used after each loop
显示 更早的评论
for a=1:24 body subplot(24,6,a) clear all; end
please help;
回答(1 个)
Jos (10584)
2016-6-23
0 个投票
Generally the use of clear all is not to be recommended, except at the beginning of a script. You can use CLEARVARS to free memory, which makes your code also much more readable.
4 个评论
Bhowmik.U
2016-6-23
Jos (10584)
2016-6-23
subplot and clear have little to do with each other. Did you read the help and documentation?
Bhowmik.U
2016-6-24
Jos (10584)
2016-6-24
Use
subplot(4, 6, a)
rather than subplot(4,6, ii)
类别
在 帮助中心 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!