How to convert table2array function in c using matlab coder

1 vue (au cours des 30 derniers jours)
upol
upol le 11 Fév 2018
Réponse apportée : upol le 27 Déc 2018
I am using a mfile which reads text files from different directory. I need to convert this mfile into C code using matlab coder because I know nothing about C program. When I try to convert the matlab coder says function is not supported. How can I convert table2array and readtable function using c coder

Réponses (2)

Gayatri Menon
Gayatri Menon le 14 Fév 2018
Hi,
Please refer the below link to see the list of functions that are supported for C code generation in MATLAB.
The functions "table2array" and "readtable" are not supported for code generation.
Thanks

upol
upol le 27 Déc 2018
I am trying to convert this simple code into excutable using matlab coder.
function y = hello_world
%#codegen
y = 'Hello World!';
converting to source code C works but when i change the build type to Executable
It gives me this error: Build error: C compiler produced errors. See the Build Log for further details.
C:/PROGRA~3/MATLAB/SUPPOR~1/R2018b/3P778C~1.INS/MINGW_~1.INS/bin/../lib/gcc/x86_64-w64-mingw32/6.3.0/../../../../x86_64-w64-mingw32/lib/../lib\libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e): undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
gmake: *** [C:/dummy/hello_world.exe] Error 1
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.
Error(s) encountered while building "hello_world":
### Failed to generate all binary outputs.

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by