Assume I have a function with 5 variables, and each one have a range constrains. I want to find the minimum of a function, as well as the values of those 5 variables which are needed to obtain that minimum value in that function. I am using the fminsearch.
func = @(x, y, z, k, m) (--some-function-which-depends-to-those-5-variable);
Assume I have above function that I want to minimize.
range_x = [12, 24];
range_y = [13.3, 30.2];
range_z = [1.4, 4.7];
range_k = [1.2, 1.4];
range_m = [4.12, 12.2];
and the above ranges.
??? = fminsearch(@(x) func(x(1), x(2), x(3), x(4), x(5)), ???)
I am currently using fminsearch function. However, I stucked the point that how can I use ranges and how can I extract the min value / and all those 5 variables which gives this result.
Thanks in advance.