Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Attempt to execute SCRIPT FILENAME as a function: Use Mex in MAC
Replies: 1   Last Post: Dec 9, 2012 10:20 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: Attempt to execute SCRIPT FILENAME as a function: Use Mex in MAC
Posted: Dec 9, 2012 10:20 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.