문제

I am using the SUBPLOT function in MATLAB to display some 8 images. The processing on the images take time, and I want the images to be shown in the subplot as and when they are generated.

But what happens is that the subplot comes up after the script finishes, and not during the execution. What is to be done to obtain this?

Here is how I am using the subplot calls.

subplot(2,4,1),subimage(I),title('image1');
//some processing
subplot(2,4,2),subimage(I),title('image2');
//some processing
subplot(2,4,3),subimage(I),title('image3');
//some processing
subplot(2,4,4),subimage(I),title('image4');
//some processing
subplot(2,4,5),subimage(I),title('image5');
//some processing
subplot(2,4,6),subimage(I),title('image6');
//some processing
subplot(2,4,7),subimage(I),title('image7');
//some processing
subplot(2,4,8),subimage(I),title('image8');
//subplot shows up now, why?
도움이 되었습니까?

해결책

You could try using the drawnow command after each subplot.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top