Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Attempt to execute SCRIPT FILENAME as a function: Use Mex in MAC
Posted:
Dec 9, 2012 10:20 PM
|
|
"Duckhwan " <kimduckhwan@gmail.com> wrote in message news:ka2uaj$pqa$1@newscl01ah.mathworks.com... > I try to use function 'FILENAME' in my matlab script. > > I have mexglx file. (I'm working on MacOSX 10.8.2)
MEX-files are platform-specific. For Mac, you will need a version of the MEX-file compiled on Mac. It will have the extension .mexmaci64.
http://www.mathworks.com/help/matlab/matlab_external/using-mex-files-to-call-c-c-and-fortran-programs.html#bra56dy-1
Before you try it, renaming your Linux MEX-file to have that extension won't work. You will need to recompile or ask the person that gave it to you to recompile it.
> When I try, the error message is "Attempt to execute SCRIPT FILENAME as a > function:"
That directory must have a script file (containing help text) with the extension .m and the same name as the MEX-file. If MATLAB can't find a MEX-file for the architecture on which you're running MATLAB, but there's a MATLAB program file with the extensions .m or .p, MATLAB will attempt to execute that program file.
-- Steve Lord slord@mathworks.com To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
|
|
|