Thread Subject: error when exe file executed

Subject: error when exe file executed

From: Min

Date: 20 Nov, 2009 03:48:03

Message: 1 of 2

hai every one,
I have complied a gui.m to gui.exe with both VC and lcc. But when i executed this .exe on the same pc, it shows the error:

 ???Error using ==> fmincon
 FMINCON cannot continue because user supplied objective function with the following error:
 Error using ==> feval
 Undefined command/function 'LikelihoodFun'

where fmincon is a function from toolbox/optim and LikelihoodFun is the first parameter of fmincon.
I guess whether the problem is because both VC and lcc cannot compile 'fmincon' from toolbox/optim ?
Please help me to solve this so i can run my exe with the fmincon function.

Subject: error when exe file executed

From: Steven Lord

Date: 20 Nov, 2009 14:35:34

Message: 2 of 2


"Min " <sunnyocean115@163.com> wrote in message
news:he53hj$c9f$1@fred.mathworks.com...
> hai every one,
> I have complied a gui.m to gui.exe with both VC and lcc. But when i
> executed this .exe on the same pc, it shows the error:
>
> ???Error using ==> fmincon
> FMINCON cannot continue because user supplied objective function with the
> following error:
> Error using ==> feval
> Undefined command/function 'LikelihoodFun'
>
> where fmincon is a function from toolbox/optim and LikelihoodFun is the
> first parameter of fmincon.
> I guess whether the problem is because both VC and lcc cannot compile
> 'fmincon' from toolbox/optim ?
> Please help me to solve this so i can run my exe with the fmincon
> function.

Read the second and third sections of this page from the documentation:

http://www.mathworks.com/access/helpdesk/help/toolbox/compiler/br2cqa0-2.html

I'm guessing you're calling FMINCON with the _string_ 'LikelihoodFun' as the
first input, yes? Call it with the _function handle_ @LikelihoodFun as the
first argument instead.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Tags for this Thread

Everyone's Tags:

exe

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
exe Min 19 Nov, 2009 22:49:10
rssFeed for this Thread

Contact us at files@mathworks.com