Advertisement
Guest User

Untitled

a guest
Nov 9th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. currkey=0;
  2. % do not move on until enter key is pressed
  3. while currkey~=1
  4. pause; % wait for a keypress
  5. currkey=get(gcf,'CurrentKey');
  6. if strcmp(currkey, 'return') % You also want to use strcmp here.
  7. currkey=1 % Error was here; the "==" should be "="
  8. else
  9. currkey=0 % Error was here; the "==" should be "="
  10. end
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement