MAT-file logging with ERT Code
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
Kishor
2012-3-2
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.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Software Development Tools 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!