User input by sign
Mostrar comentarios más antiguos
I want that by pressing symbol of sum (+) or subtract (-) I simply got the answer of two inputs given by user.
2 comentarios
Dyuman Joshi
el 4 de Sept. de 2023
Answer to what?
Do you want to get the sum when the input is "+" and subtraction when given input "-"?
John D'Errico
el 5 de Sept. de 2023
You sound like you want to go back to using a spreadsheet. MATLAB is not a spreadsheet.
Respuestas (1)
Walter Roberson
el 5 de Sept. de 2023
0 votos
See https://www.mathworks.com/matlabcentral/answers/143088-real-time-detect-keypress#answer_285124 for a list of key press processing available by using the third-party Psychtoolbox
Other than that, you have to have a figure up and use a KeyPressFcn callback; https://www.mathworks.com/help/matlab/ref/matlab.ui.figure-properties.html#buiwuyk-1-KeyPressFcn
Categorías
Más información sobre Timing and presenting 2D and 3D stimuli 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!