Application compiler does not recognize button press
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I wrote a matlab code where I use left arrow and right arrow button keys to increase my frame counter in a while loop where I plot a video. On the plot window it basically plots the new frame each time the left or right button key is pressed.
Now I used the application compiler to create an application. However when I execute the application it does not do anything on left arrow and right arrow button press.
Any idea why?
Here is a short description of the code:
while (frame <= endframe & frame >= startframe)
thisFrame = read(v, frame);
hImage = subplot(2, 1, 1);
imshow(thisFrame, 'Parent', ax1);
pause(); % wait for a keypress
currkey=get(gcf,'CurrentKey');
if strcmp(currkey, 'rightarrow')
frame = frame + 1;
continue;
end
if strcmp(currkey, 'leftarrow')
frame = frame -1;
continue;
end
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!