- fminsearch: https://www.mathworks.com/help/optim/ug/fminsearch.html
- Parameterizing Functions: https://www.mathworks.com/help/matlab/math/parameterizing-functions.html
- Banana Function Minimization: https://www.mathworks.com/help/optim/ug/banana-function-minimization.html
fminsearch with integrals and parameters
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am new to using fminsearch in matlab. I want to find the minimum value of the following function:
where
For now, I assumed that A_t,B_t,K_t are uniform random between [0,1].
I want to find the value of debt and the value of parameters kappa, theta, chi.
I want to use fminsearch,but I am not able to write down the specification correctly.
0 comentarios
Respuestas (1)
Saarthak Gupta
el 15 de Dic. de 2023
Editada: Saarthak Gupta
el 15 de Dic. de 2023
Hi Prerna,
I understand you wish to minimize your objective function with extra parameters.
It would be helpful if you could provide the context in which the problem is defined, since the problem statement alone does not exhaustively define all variables. Moreover, it is unclear as to why At, Bt, Kt are chosen to be uniformly distributed.
One approach you could use is to parametrize the objective function using an anonymous function. Refer to the following example:
The Rosenbrock function is a non-convex function used as a performance test problem for optimization algorithms. In its two-dimensional form it is defined as:
Suppose we parametrize this function, with the parameter “a”:
This function has a minimum value of 0 at x1=a, x2=a^2
Since these parameters are not variables to optimize, they are fixed values during the optimization, and you may assign them a value of your choice. If, for example, a=3, you can include the parameter in your objective function by creating an anonymous function
% Create the objective function with its extra parameters as extra arguments.
f = @(x,a)100*(x(2) - x(1)^2)^2 + (a-x(1))^2;
% Put the parameter in your MATLAB® workspace.
a = 3;
% Create an anonymous function of x alone that includes the workspace value of the parameter.
fun = @(x)f(x,a);
% Solve the problem starting at |x0 = [-1,1.9]|.
x0 = [-0.5,2];
x = fminsearch(fun,x0)
Please refer to the following answer for solution to a similar problem: https://www.mathworks.com/matlabcentral/answers/517948
Please refer to the following MATLAB documentation for further reference:
Hope this helps!
Best regards,
Saarthak
0 comentarios
Ver también
Categorías
Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!