How can I use fmincon in the mle function?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to use the mle function with constraints on the parameters. According to the matlab help you can choose between fminsearch (default) and fmincon (as long as you have the Optimization Toolbox) using 'optimfun'. The issue is it doesn't say how you set constraints when using fmincon instead of fminsearch.
This is the command line I am running in matlab
[para ci] = mle(D,'pdf',@Skellam_pdf,'start',[1,.5,.2,-.2],'optimfun','fmincon')
It still generally finds a solution but the parameters rarely, if ever, satisfy the constraints. I'm not sure if it is possible to add constraints(as I haven't been to find a way) but it seems unlikely that matlab wouldn't have included this in the mle function.
0 comentarios
Respuestas (1)
Edward Umpfenbach
el 13 de Sept. de 2012
Simple answer. Type:
help fmincon
It contains all the info for fmincon and some simple examples. Don't see a need to repeat it.
If something isn't clear in the help, then say so. Supply MLE as an anonymous function to fmincon.
Ver también
Categorías
Más información sobre Parallel Computing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!