set function doesn't work
Mostrar comentarios más antiguos
Hello, Im using this code to get the pressed key of my keyboard, returning the value of the key in the variable h, but doesn't work, and occurs this error:
%h=set(gcf,'keypressfcn','get(gcbf,''currentkey'')');
One or more output arguments not assigned during call to "set".
Error in Untitled3 (line 2) h=set(gcf,'keypressfcn','get(gcbf,''currentkey'')');
What is wrong with the code? Help me please
Respuesta aceptada
Más respuestas (2)
Image Analyst
el 28 de Sept. de 2014
Where is that code? Is it in the keypress callback function? Are you using GUIDE, or struggling to wire it up on your own from scratch? In the callback function for keypress, can't you just do
theKey = get(gcf, 'currentKey');
or something like that? (I've never actually done it so I'm just guessing at the correct property to ask for.)
Categorías
Más información sobre Entering Commands en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!