Create a block to read keyboard inputs
Mostrar comentarios más antiguos
I want to create a block in simulink which prompts me to enter a key & reads ASCII values from keyboard while running a simulation. Input to the block is through keyboard & output is its ASCII value.
I think this can be done either in S-function or embedded matlab function blocks. But I dont know how to use these blocks.
Can someone help???
Respuesta aceptada
Más respuestas (1)
Kaustubha Govind
el 17 de Jun. de 2011
Editada: John Kelly
el 26 de Feb. de 2015
0 votos
The Embedded MATLAB Fcn block should be sufficient for your purpose. You can use the input function to read inputs from the keyboard.
Here is an example using the Embedded MATLAB Block: Creating an Example Model That Uses a MATLAB Function Block.
2 comentarios
Raju Purohit
el 21 de Jun. de 2011
Kaustubha Govind
el 21 de Jun. de 2011
You can use eml.extrinsic to call functions unsupported for code generation.
Categorías
Más información sobre Event Functions en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!