How to show multiple figures per cycle and save into a specific folder

2 次查看(过去 30 天)
I have 100 cycles, each cycles will have 42 figures, my problem is only 42 figures show up for last cycle, which mean the 42 figures did not show up for every cycle (except the last cycle) when the code run. How do I make 42 figures show up for first cycle and close, and for the next cycle the 42 figures will show up and close, and so on until the last cycle. Each 42 figures per cycle I want to save into a specific folder that must be created. Help me!
figure;
subplot(1,2,1);
imshow(ProcessedImage(:,:,i));
subplot(1,2,2);
imshow(boundary_thin(:,:,i));

回答(1 个)

John Doe
John Doe 2019-5-5
You can use the publish function - I used it very recently for an almost identicle case and was guided on here.
https://uk.mathworks.com/matlabcentral/answers/443393-how-to-plot-graphs-from-for-loop-to-html-grid
https://uk.mathworks.com/help/matlab/ref/publish.html

类别

Help CenterFile Exchange 中查找有关 Graphics Object Programming 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by