I normally store all my files on the University's central file store (which is backed-up every few hours). Saving the Simulink model on this file-store, does not allow the MATLAB function to work. I now tried saving the model onto the C drive of my computer, and it worked. Any ideas on how one could make this work on common file-stores?
MATLAB function (Simulink) - "Error calling generated SFunction Invalid MEX-file: Access is denied."
1 view (last 30 days)
Show older comments
I have a Simulink model which has only the default MATLAB Function block (the input to the block to sent out as the output fromthe block). When I run this model without saving the model, it works. If I save the model and try to run it, I get the following error -
"Error calling generated SFunction, MATLAB_func_simple_test_25102016_sfun. Invalid MEX-file 'S:\Research\MATLAB_func_simple_test_25102016_sfun.mexw64': Access is denied."
I had a look at Mathworks forums and questions on similar issues and tried the following: 1. Ensured that the Simulink model and the MEX file were built using the same version of MATLAB on the same computer. 2. Tried deleting the MEX file and the slprj folder and tried re-running the Simulink model.
I am running MATLAB R2014b 64-bit.
2 Comments
Zunaib
on 25 Oct 2016
The problem is due to the reason that you might have installed previous or latest version of mex setupt which is giving error when you save your file. Kindly remove you matlab, remove entries from regedit and then re-install MATLAB.
Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing 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!