I have figured it out! It's because I didn't do "mex -setup" in the MATLAB command window. It's working now.
I am receiving a "Make Error" when trying to run a simple model in Simulink containing a MATLAB function block. Can anyone help please?
    2 views (last 30 days)
  
       Show older comments
    
    David
 on 20 Aug 2013
  
    
    
    
    
    Commented: Walter Roberson
      
      
 on 15 Sep 2016
            I am receiving the following "Make Error" when trying to run a simple model in Simulink containing a MATLAB function block:
Making simulation target "untitled_sfun", ...
'untitled_sfun.bat' is not recognized as an internal or external command, operable program or batch file.
The model is called "untitled". I know it has something to do with the MATLAB function block because the model works without it. Can anyone help please?
3 Comments
  Gul Rukh Khan
 on 15 Sep 2016
				I have the same problem, "Make Error", and I have already done mex -setup command, compiler comes when I press 1 for compiler, then "Error using mex (line 206) Unable to complete successfully." comes and I am unable to resolve this. Requested if anyone resolve the issue for me with many thanks. Regards
Gul Rukh Khan
  Walter Roberson
      
      
 on 15 Sep 2016
				Gul Rukh Khan, which MATLAB version are you using? And does your directory happen to contain any spaces or any non-ASCII characters?
Accepted Answer
  Walter Roberson
      
      
 on 20 Aug 2013
        You need to install a compiler (if you have not already) and use
mex -setup
More Answers (0)
See Also
Categories
				Find more on Simulink Coder in Help Center and File Exchange
			
	Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

