I have some code that compiles to .mex and to C++ fine in R2018a, but in R2024b, it errors after running out of memory.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dr W Kurt
el 13 de Oct. de 2024
Comentada: Dr W Kurt
el 22 de Oct. de 2024
I can't post my code on a public place like this. Is there any way this can be done privately?
I have looked at coder.config('mex') and coder.config('lib') for both versions and can't see anything obvious.
2 comentarios
Walter Roberson
el 13 de Oct. de 2024
You could offer to send links to private repositories on dropbox or google; the question is whether you would get anyone interested who would be willing to sign a Non-Disclosure Agreement for free consultation.
Respuesta aceptada
Subhajyoti
el 22 de Oct. de 2024
Editada: Subhajyoti
el 22 de Oct. de 2024
It is my understanding that you are able to generate the MEX files for your code. But when you are trying to generate C/C++ files, it is throwing out of memory error.
This error is due to implicit expansion operation occurring during run-time.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1797015/image.png)
Refer to following MathWorks Documentation link to know more about ‘Optimize Implicit Expansion in Generated Code’ in MATLAB:
While generating MEX file, the MATLAB Coder generates C or C++ files (as mentioned in code-generation parameter) and the MEX file acts like an API between MATLAB and the C/C++ file. You can also use these C/C++ files directly as a workaround for code-generation error. The C/C++ build files are generated in the following path:
./codegen/mex/OFDMRxR1/
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1797020/image.png)
Additionally, you can refer to the following resources to know more about Analysis and Generation of C/C++ Code from MATLAB Code Using "MATLAB Coder":
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!