Simulink/Stateflow Coder Error - failed to create *sfun_debug_macros.h.
Show older comments
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.
Accepted Answer
More Answers (1)
Walter Roberson
on 27 Jan 2012
0 votes
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 Comments
Michael
on 27 Jan 2012
Walter Roberson
on 27 Jan 2012
Is that *filename* in the file name literal? backslash asterisk "filename" asterisk sfun_debug_macros.h ?
Michael
on 27 Jan 2012
Kaustubha Govind
on 27 Jan 2012
Could you try running "mex -setup", select a selected compiler and rerun the model to see if the error goes away?
Michael
on 27 Jan 2012
Michael
on 27 Jan 2012
Kaustubha Govind
on 27 Jan 2012
Do you have a Stateflow chart in your model? Or is your user-defined function using an (Embedded) MATLAB Function block?
Michael
on 27 Jan 2012
Categories
Find more on Event Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!