필터 지우기
필터 지우기

Application compiler does not recognize button press

조회 수: 1 (최근 30일)
Konvictus177
Konvictus177 2021년 10월 18일
편집: Konvictus177 2021년 10월 18일
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개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by