MAT-file logging with ERT Code

4 vues (au cours des 30 derniers jours)
Yu Ang Tan
Yu Ang Tan le 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 commentaires
Yu Ang Tan
Yu Ang Tan le 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 le 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Software Development Tools 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