View code generation readiness issues , c code generation from Matlab function

3 ビュー (過去 30 日間)
Hi guys, I got some issues while generate the 'C' Code from Matlab Function.Issue like this "Unsupported MATLAB Function calls" & "Code generation tools may fail unless the issues listed below are fixed". The following basic MATLAB comments are not supported while generate the C code 1.input, 2.cell2mat, 3.xlsread, etc.
So can you guys please tell instead of these comments.?
Thanks Murugan

採用された回答

Walter Roberson
Walter Roberson 2017 年 4 月 26 日
The appropriate replacement for input() is going to depend upon how your code is getting its input. fgets() (followed by removing the line terminator) and getline() are possibilities if you are working with a stream input; gets() for unbuffered input. However, if you are generating for hardware, the hardware might not have streams or files or stdin and you might have to use a completely different kind of input.
xlsread() has no replacement in standard C or C++. You would need an external library -- presuming that the hardware you are using has a file system at all.
Instead of cell2mat, you should create a 2D array of the proper size and copy out of the cell array into the 2D array.
  2 件のコメント
Murugan C
Murugan C 2017 年 4 月 28 日
Hi Walter, I tried whichever you said syntax, that also getting same issue. In real time, I want give input through key board and will process it. so can you please help me? Thanks
Walter Roberson
Walter Roberson 2017 年 4 月 28 日
You have not indicated what your target hardware is. A lot of target hardware does not have a keyboard as such -- it is more likely to have buttons for input.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by