MAT-file logging with ERT Code
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I code-generated a test model (step function + transfer function + output port) using the ERT with MAT-file logging enabled. After building the executable file, it ran fine. A MAT-file is generated, as expected.
When I tried building the same project in Microsoft Visual C++, the compiler tells me that the file "rtw_matlogging.h" is missing. (I have added the '<MATLABROOT>\rtw\c\src' path, and also the "rt_logging.c" file as required.)
I found a copy of "rtw_matlogging.h" in '<MATLABROOT>\simulink\include' path and when I used it, the project compiled fine.
However, no MAT-file generated at the end of the simulation.
In summary, I have not made any modifications, but added the following:
rt_logging.h <MATLABROOT>\rtw\c\src
rtw_matlogging.h <MATLABROOT>\simulink\include
So my question is: Did I add in the correct files? The simulation gave exactly the same results, but there was no MAT-file to be seen.
This problem got me stumped. Has anyone experienced the same thing?
Additional: Thanks to Kaustubha Govind who suggested the PackNGo function. I tried it, but the same source code produces different behaviour in Visual C++. I have tried using CodeBlocks, which exhibits the same behaviour.
3 Commenti
Kishor
il 2 Mar 2012
Hi Yu Ang Tan,
As you have mentioned above.A am facing same problem.
so how to add those required files file path, so i will able to do mexing of autocode generated for my model by using Microsoft Visual C++ 2010.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Software Development Tools in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!