Filter löschen
Filter löschen

Application compiler does not recognize button press

1 Ansicht (letzte 30 Tage)
Konvictus177
Konvictus177 am 18 Okt. 2021
Bearbeitet: Konvictus177 am 18 Okt. 2021
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

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by