How to call a function in fmincon
Show older comments
I have function named LL in a script named LL.m this fuction is like this
function param1=LL(u1, u2, x) param1=-sum(log((exp(-((-log(u1)).^x %+sum other stuff part continues end
u1 and u2 are 40*1 vectors of data so x is the only variable how can I call this in fmincon? I wrote it like this but it did not work
[Teta, LL] = fmincon(@(x)LL,1.5,1,10000) or [Teta, LL] = fmincon(LL,1.5,1,10000)
Thank you
Accepted Answer
More Answers (1)
Fred
on 15 Oct 2012
0 votes
Categories
Find more on Problem-Based Optimization Setup in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!