Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Matlab Compiler Problem

2 views
Skip to first unread message

Michael Liu

unread,
Oct 4, 2007, 11:44:36 PM10/4/07
to
I have one problem with matlab compiler to build a
stand-alone application.

My main function m file built an m file under a temporary
directory upon execution of main file. This m file was used
as a function to solve an ODE system. This runs well under
matlab environment.

However, after compilation using "mcc -m ***.m", runing the
***.exe has the problem to solve ODE system. The error
message prompted as follows "The matlab file does not have
proper information and may be corrupt." Then I tried
another way by compilation of main m file provided ODE
function file initially rather than generation of new m file
during execution of stand-alone application. The executable
file runs well.

I guess the reason is that new generated m file is not
encrypted by "mcc" command so that the executable file can
not recognize new m file. However, The generation of new ODE
function file is required for my application.

So My question is that if there is any other way to compile
this kind of m file to a stand-alone application.

Any help on this is highly appreciated. I am looking forward
to any comments or suggestion.

Thanks,


Romesh Gunesekera

unread,
Nov 21, 2011, 7:45:09 AM11/21/11
to
"Michael Liu" <gan...@buffalo.edu> wrote in message <fe4bv4$kds$1...@fred.mathworks.com>...
Bump! Any suggestions? I have this situation as well

Prats

unread,
Nov 21, 2011, 8:16:07 AM11/21/11
to
Hello
plz try mcc -m YourMainFileName.m -a ODEFileName.m


"Michael Liu" <gan...@buffalo.edu> wrote in message <fe4bv4$kds$1...@fred.mathworks.com>...

Steven_Lord

unread,
Nov 21, 2011, 12:00:45 PM11/21/11
to


"Romesh Gunesekera" <romes...@gmail.com> wrote in message
news:jadh4l$hp2$1...@newscl01ah.mathworks.com...
> "Michael Liu" <gan...@buffalo.edu> wrote in message
> <fe4bv4$kds$1...@fred.mathworks.com>...

*snip*

>> I guess the reason is that new generated m file is not encrypted by "mcc"
>> command so that the executable file can
>> not recognize new m file. However, The generation of new ODE
>> function file is required for my application.

Correct.

>> So My question is that if there is any other way to compile
>> this kind of m file to a stand-alone application.

Your application can only call functions that are included in the MCR;
generating new functions at runtime will NOT work.

If you're generating the file to change some of the parameters in the ODE
function, instead pass additional parameters into your ODE function.

http://www.mathworks.com/help/techdoc/math/bsgprpq-5.html

--
Steve Lord
sl...@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

0 new messages