Create a block to read keyboard inputs
古いコメントを表示
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???
採用された回答
その他の回答 (1 件)
Kaustubha Govind
2011 年 6 月 17 日
編集済み: John Kelly
2015 年 2 月 26 日
0 投票
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 件のコメント
Raju Purohit
2011 年 6 月 21 日
Kaustubha Govind
2011 年 6 月 21 日
You can use eml.extrinsic to call functions unsupported for code generation.
カテゴリ
ヘルプ センター および File Exchange で Event Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!