Imshow not showing image on windows, but it works on mac

1 visualizzazione (ultimi 30 giorni)
Hello,
I am trying to compare some data with a video using imshow. The goal is to go through the data and the video at the same time. A video is playing in subplot(2,1,1), while the algorithm goes through the data in subplot(2,1,2).There is a jpeg file of the plot in the attachment. A friend made a program that works on his mac, but the same matlab file doesn't work on my windows pc. We both use matlab 2015b.
My problem: The figure is not showing. I can stop the file from running and then the figure (attachment) pops up, but I can't see it while the file is running.
Here is some part of the file: (if you want i can put the whole file with the videos on a dropbox)
for k =1:5:700
%tic % start timer --> end = toc
subplot(2,1,1)
frame= read(VID,initialframe+k-1);
imshow(frame(y(1):y(2),x(1):x(2),:));
subplot(2,1,2)
hold on
xmarkers = begindata*fps + (k-1); %begindata = prompt%begin*fps+(k-1)+5*fps; %129.5 is zijn start
% place markers at these x-values; %2
ymarkers =currentdatanew(round(xmarkers));
plot(tnew,currentdatanew,'b',xmarkers/fps,ymarkers,'g*') %xmarkers begin!!
isgyr = 1;
xlim([xlimits_L(swimmer)+(k/fps),xlimits_H(swimmer)+(k/fps)-150])%xlimits_L(swimmer)+(k/fps)
ylim([-3.*isgyr,3.*isgyr])
hold off
end
I hope someone can help me. Thanks in advance!

Risposte (1)

Mike Garrity
Mike Garrity il 29 Mar 2016
It sounds like you need a call to drawnow.

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by