Minimization is a subclass of mathematical optimization where given a cost or objective function, the goal is to choose the best set of parameters that will minimize the value given by this function.
Questions tagged [minimization]
529 questions
3
votes
2 answers
fminbnd doesn't give the minimum value
I'm trying some built-in functions in MATLAB. I declared a function like this:
function y = myFunction(x)
y = cos(4*x) .* sin(10*x) .* exp(-abs(x));
end
Then I use fminbnd to find the minimum value:
fminbnd(@myFunction,-pi,pi)
This gives me…

lenhhoxung
- 2,530
- 2
- 30
- 61
3
votes
1 answer
Loops to minimize function of arrays in python
I have some large arrays each with i elements, call them X, Y, Z, for which I need to find some values a, b--where a and b are real numbers between 0 and 1--such that, for the following functions,
r = X - a*Y - b*Z
r_av = Sum(r)/i
rms = Sum((r -…

user3059201
- 775
- 2
- 7
- 11
3
votes
1 answer
Optimization with F#
I'm quite new to F# and have a problem.
I want to solve a nonlinear, constrained optimization problem.
The goal is to minimize a function minFunc with six parameters a, b, c, d, gamma and rho_infty, (the function is quite long so I don´t post it…

user3489455
- 41
- 1
3
votes
0 answers
Penalized interpolation in python or matlab
I have a Loss function L and 2 signals f(t),g(t) .
I would like to find the function s that minimize: L(f(t)-g(t+s(t)))+lambda*integral(s''(t))
Ideally the s should be a polynomial or a spline.
Here the code I have written to start the…

Donbeo
- 17,067
- 37
- 114
- 188
3
votes
3 answers
2D Function Minimization Algorithm or C/C++ library
I need to minimize a 2D function f(x,y). I already have 1-D minimization using Brent's Method (similar to bisectional search for finding a root.) I thought a 2D version would be a pretty straightforward, common problem that would have lots of good…

Jim
- 651
- 2
- 7
- 15
3
votes
2 answers
How to find the nearest points to given coordinates with MATLAB?
I need to solve a minimization problem with Matlab and I'm wondering which is the easiest solution. All the potential solutions that I've been thinking in require lot of programming effort.
Suppose that I have a lat/long coordinate point (A,B), what…

cardogar
- 359
- 1
- 4
- 17
3
votes
1 answer
root minuit2 contours with parameter limits
I'm trying to produce contour plots for parameters with physical limits using the Minuit2 minimizer which is a part of the ROOT data analysis framework. Unfortunately, Minuit2 seems intent on drifting the parameters into regions outside of their…

user545424
- 15,713
- 11
- 56
- 70
3
votes
2 answers
How can I minified CSS and JS with custom configuration?
I need a reliable JS and CSS minimizer which is possible to customize and compatible with modern CSS3 properties. I prefer it has something like property file in order to configuration.
Would you please help me on this?

user1444021
- 119
- 1
- 1
- 6
3
votes
2 answers
Minimize complex linear multivariable function in java
I need to minimize a complex linear multivariable function under some constraints.
Let x be an array of complex numbers of length L.
a[0], a[1], ..., a[L-1] are complex coefficients and
F is the complex function F(x)= x[0]*a[0] + x[1]*a[1] + ... +…

user1324005
- 31
- 3
2
votes
1 answer
Spanning tree that minimizes a dynamic 'metric'
Let us have a graph. When we remove an edge, 2 'cars' are created, one from each vertice of the edge. when these 2 cars meet they stop. The problem is to create a spanning tree so that the sum of the numbers of cars that pass through each vertice is…
2
votes
1 answer
There is an python code to solve an optimal control problem but I don't get the solution. I don't what is wrong
The goal is to minimise the compartment M_u and F_u at the end and maximize M_i and F_i. My function objective is:
In LaTeX:
$J(u)=M_u^2+F_u^2+ \int_0^T(Mi+Fi)u^2dt$
the ode system to control is the following. Where u is the control
In…

Nash
- 21
- 3
2
votes
1 answer
Issues while using JAX to minimize the Lennard-Jones potential for two points and the force (gradient of the potential)--result doesn't match
I am trying to use the minimization function in JAX to find the distance of two points satisfying Lennard-Jones potential E = 2(1/r^4-1/r^2) and I can succssfully get the result: [-0.20710678 1.20710678], which r = 1.41 as expected. However, next I…

Heng Yuan
- 43
- 4
2
votes
1 answer
How to defining Non Linear Vector Constraints in Julia
I'm trying to minimize a function which takes a vector as input and is subjected to some non linear constraints. I'm very new to Julia. I’m trying to implement pseudospectral methods using Ipopt.My isssue is Optimizer which i'm using takes gradient…

Gummala Navneeth
- 123
- 4
2
votes
1 answer
Identifying when greedy method gives optimum solution
I was looking at this problem on leetcode
https://leetcode.com/problems/minimum-number-of-operations-to-convert-time/description/
The hints tell us to follow a greedy approach where we convert the time difference to minutes and pick the largest…

Clarence Callahan
- 53
- 1
- 4
2
votes
1 answer
How do I prevent one value from exceeding another value in a vector when minimizing it?
When minimizing a function, I'm trying to prevent one value from exceeding another value in the used vector.
For example, this code optimizes init_x:
using Optim
f(x) = (1.0-x[1])^2+100.0*(-x[2]^2)^2
init_x = [0.0,0.0]
res =…

user14640997
- 43
- 2