Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How to optimize a specific logistic type equation using 'fminunc' and quasi-newton algorithm ?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I have y (dependent variable) and x (independent variable) data and want to develop a logistic model in the form of y = ymax/(1+exp(b-k*x). I want to optimize the solution to get b and k value by writing a function and solving them using 'fminunc'.
The values are like: ydata = [1.5 1.8 2.1 2.5 2.65 2.75] with xdata = [1 3 5 7 10 20], ymax = max(ydata). I wrote following code: function f = glass(x,xdata, ydata) f = (2.06/(1+exp(x(1)-x(2)*xdata)))- ydata;
in command window: ydata = [1.5 1.8 2.1 2.5 2.65 2.75]; xdata = [1 3 5 7 10 20]; x0 = [0.5; 0.5]; F = @(x)glass(x,xdata, ydata); [x,fval] = fminunc(F,x0) but it fails every time and says too many input input argument. Also want to mention quasi-newton algorithm to optimize it. How could I solve this problem?
Any help is appreciating.
0 comentarios
Respuestas (1)
Alan Weiss
el 4 de Dic. de 2013
There is an example showing how to solve this type of problem with both fminunc and with other, more efficient solvers. Follow the example carefully (especially where it shows how to define the objective function).
Alan Weiss
MATLAB mathematical toolbox documentation
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!