MATLAB function (Simulink) - "Error calling generated SFunction Invalid MEX-file: Access is denied."

1 次查看(过去 30 天)
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 个评论
Anup
Anup 2016-10-25
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?
Zunaib
Zunaib 2016-10-25
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by