I have written a MATLAB file and I am trying to generate C-code out of it using the EMLC command.
However, I do not see the equivalent of the MATLAB code in the generated code.
Here is the code I have written:
function rc = main %#ok
%#eml
eml.extrinsic('fopen');eml.extrinsic('fwrite');eml.extrinsic('fclose');fid = eml.opaque('FILE*','NULL'); %#oka = 1;A = functionA(a);fid = fopen('output.txt','a+'); % Open or create new file for reading and writing. Append data to the end of the file
fwrite(fid,'The output is %f', A);fclose(fid);rc = A;
The generated C code does not contain any code to write to the file.
Best Answer