MATLAB: Can I use ubuntu to compile mexFunction and run it on windows
mexUbuntuwindows
Can I run mexw64 compiled with an ubuntu on a 64 bit Windows 7?
Best Answer
Not unless you have a compiler on Ubuntu that can produce a Windows binary. Also, you will need to get the MEX command to work with this compiler, which will involve customizing the mexopts.sh file that is used as an options file during compilation.
you create a mexFunction in which you tell matlab how many outputs and inputs and you read your inputs and define your outputs. I think this link can help you
The truth is you need to play with it, in that page there are very simple but meaningful examples. It also points you to build in examples inside matlab.
If UAC (User Account Control) is turned on Windows 7, the MinGW support package might say success, but the compiler may not be there and mex won't find it. The reason for this is that xcopy silently fails due to UAC being turned on.
Resolution is to turn off UAC. Please follow the below link to turn off UAC:
Best Answer