error: Code generation failed Failed to create file
26 views (last 30 days)
Hi, when I try to run my simulation I am getting this error Code generation Failed to create file: D:\Nagendra\Matlab\Vehicle Simulation Package\ARIA_EAMT\slprj\_sfprj\untitled\_self\sfun\src\c1_untitled.h
I use matlab 2011a with Windows XP 64 bit version...can any body help me how to resolve the issue
Kaustubha Govind on 15 May 2012
It appears that a Stateflow chart in your model needs to generate code for execution, but MATLAB/Simulink is unable to write to disk. Perhaps you don't have write privileges in this folder? Try starting MATLAB with "Run as administrator" and see if that helps.
chef13 on 25 Nov 2014
I have the same problem and I knew it was because I didn't have privileges. The problem is that when I run matlab as an administrator I am able to create the folder but the problem is that then matlab crashes. Then I restart matlab NOT as an administrator and (because the folder and the file were created without problems when I started it as an admin) everything runs smoothly.
What should I do to solve the problem?