How to read a character from keyboard in Mex file?

4 ビュー (過去 30 日間)
Anabel almodovar
Anabel almodovar 2019 年 3 月 21 日
Dear all,
I am using a mex file and I would like to get a character from keyboard but I got some problems.
I have tried several options such cin or getchar() but Matlab just ignores the lines.
char c;
getchar();
getchar();
-------
fflush(stdin);
cin >> c;
-------
while(cin.get()!='\n' && !cin.eof());
Because I am using a mex file I am wondering if maybe there are an specific function from mex file that implement this.
Regards,
Anabel Almodóvar

回答 (0 件)

カテゴリ

Help Center および File ExchangeCall C++ from MATLAB についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by