Simulink/Stateflow Coder Error - failed to create *sfun_debug_macros.h.
显示 更早的评论
Hello,
I'm attempting to implement a simple post-processing function to calculate the mode of a sample. I have a signal buffer immediately prior to a user-defined mode function. I made a test model using a random number generator and then multiplied, rounded, and buffered the signal to achieve the same dimensional input of my real project model. The function performs fine in this test case. The signal in my project model emits from the Index port of a Minimum block.
When I implement the same buffer and user-defined function in my project, I get the following errors:
Coder Error - Stateflow - Failed to create file: C:\...path removed...\*filename*sfun_debug_macros.h.
Model Error - Simulink - Error using ==> sf Error using ==> construct_error at 109 Failed to create file: C:\...path removed...\*filename*sfun_debug_macros.h.
I thought perhaps my student version was limiting me, but I have no issue employing my user-defined function in another model. Any suggestions are much appreciated.
采纳的回答
更多回答(1 个)
Walter Roberson
2012-1-27
0 个投票
As best I can tell, Simulink Coder and Stateflow Coder are not available for the Student Version.
However, it is not clear to me that you are using Simulink Coder or Stateflow Coder as such.
8 个评论
Michael
2012-1-27
Walter Roberson
2012-1-27
Is that *filename* in the file name literal? backslash asterisk "filename" asterisk sfun_debug_macros.h ?
Michael
2012-1-27
Kaustubha Govind
2012-1-27
Could you try running "mex -setup", select a selected compiler and rerun the model to see if the error goes away?
Michael
2012-1-27
Michael
2012-1-27
Kaustubha Govind
2012-1-27
Do you have a Stateflow chart in your model? Or is your user-defined function using an (Embedded) MATLAB Function block?
Michael
2012-1-27
类别
在 帮助中心 和 File Exchange 中查找有关 Event Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!