Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- currkey=0;
- % do not move on until enter key is pressed
- while currkey~=1
- pause; % wait for a keypress
- currkey=get(gcf,'CurrentKey');
- if strcmp(currkey, 'return') % You also want to use strcmp here.
- currkey=1 % Error was here; the "==" should be "="
- else
- currkey=0 % Error was here; the "==" should be "="
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement