.m to mex file

4 views (last 30 days)
ab
ab on 18 Apr 2013
I have a MATLAB program which I need to call from php. I converte it into an exe with the help of deploytool but it is too slow. So I want to convert it into a mex file or a C file then to a exe so that the execution time speeds up. What is the best method to do this?Illoked at the MATLAB coder but I don't think so it supports my program.
I am trying with mcc -m C:\Users\adithi.a\Desktop\FashionSearch\trial\shoes.m but the process is not ending. What could be the reason? I want a process that makes my execution fast.

Answers (1)

Walter Roberson
Walter Roberson on 18 Apr 2013
Your difficulty is with the startup time for MCR, which is still going to be a problem if you convert to .mex (mex are called by MATLAB or MCR so the runtime needs to load.)
To convert to something that does not use the runtime, you need to use MATLAB Coder. If the MATLAB features you need are not supported by MATLAB Coder, then you can attempt to rewrite your code into the supported subset.
In one of your other Questions, I suggested you could use MATLAB Automation, and someone else suggested that you could use MATLAB Production Server. Both of those would avoid having to start MCR each time.

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!