MAT-file logging with ERT Code

4 visualizzazioni (ultimi 30 giorni)
Yu Ang Tan
Yu Ang Tan il 18 Nov 2011
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
Yu Ang Tan
Yu Ang Tan il 23 Nov 2011
Kaustubha:
Yes I have deleted the question, as I've accidentally flagged it as an answered response. Didn't see your response though. Sorry for the trouble.
Kishor
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.

Accedi per commentare.

Risposte (0)

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!

Translated by