Filter löschen
Filter löschen

MAT-file logging with ERT Code

6 Ansichten (letzte 30 Tage)
Yu Ang Tan
Yu Ang Tan am 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 Kommentare
Yu Ang Tan
Yu Ang Tan am 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 am 2 Mär. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Software Development Tools finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by