Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.

learn more… | top users | synonyms (2)

0
votes
0answers
50 views

Optimization without evaluating the analytical expression?

Firstly, forgive me for my lack of knowledge of programming and Mathematica. I have an optimization problem involving very large matrices when they are in analytical form. If I tried to generate ...
1
vote
0answers
38 views

A more efficient way of fitting a non-linear model that returns an entire list?

I have a function that takes two parameters, del and nu, and returns a list npoints long ...
0
votes
0answers
70 views

How to minimize the sum of squares of deviations from the mean?

I am trying to minimize the sum of squares of a deviation from the mean applying the following: Minimize[Sum[(Subscript[x, i] - \[Mu])^2, {i, 0, n}], x] It ...
0
votes
0answers
53 views

Constraint minimization with NMinimize

I am using the following code in order to minimize the function chi ...
0
votes
0answers
48 views

Interpreting a certain result of Minimize

I am given a certain function $f(k_1)$ that I would like to minimize. Asking Mathematica to do it (and supplying the given bounds of other parameters in the expression) I get the following result: ...
1
vote
2answers
160 views

Solve within a range?

Is it possible to solve an equation in which some some of the parameters have defined ranges? Example: ...
0
votes
1answer
82 views

Mathematica won't maximize my function

I'm trying to maximize two functions. For the first one, the code runs correctly and returns the desired answer ...
1
vote
0answers
85 views

How to optimize my code?

I use Mathematica to handle data.My trial as below: Interpolation function: ...
0
votes
1answer
51 views

Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...
2
votes
2answers
137 views

Fitting a variable using multiple equations

I would like to find the best fit of two variables for a number of approximate equations, such as: 1x+2y+2=7.04 2x+y+4=7.98 1.5x+1.5y-2=2.53 1.8x+3y-1=6.77 That ...
6
votes
2answers
607 views

Distribution of 10 points within a unit square

Related to some packing problems, following problem arose: Distribute 10 points within a square of sides 1, so that minimal distance between them is maximized. With the help of random simulation, or ...
2
votes
2answers
133 views

Find minimum value of function which calls NDsolve [duplicate]

I have defined a function which takes a coefficient for a differential equation as an argument, solves the differential equation with NDSolve, and returns the value of the solution at time t=10. I can ...
1
vote
0answers
78 views

DSolve does not solve my system of PDEs

I am a long time Maple user who had just recently got hands on Mathematica. I have a "simple" system of PDEs, one can be solved easily. But I cant seem to get it work in Mathematica. I am nos sure ...
1
vote
0answers
137 views

Travel time sweet spot using: Mathematica and Google Maps API

I want to use Mathematica to do some time minimisation calculations calling on Google Maps API for travel time data. I'm concerned with travel time, e.g. along roads (by car or walk) and not linear ...
1
vote
0answers
23 views

Minimizing roots of a transcendental equations [duplicate]

I'm trying to use the solution of FindRoot with parameters for further calculations. Annoyingly enough it always gives me trouble with replacing the parameters. As an example I'm attaching a simple ...
1
vote
0answers
63 views

Linear interpolation over 2 variables

I'm tuning a function to data over 4-5 variables using Differential Evolution. The objective function calls frequently interpolation function. I came to a point, where compiling the objective function ...
0
votes
0answers
65 views

Minimize solution to linear system with singular system matrix

I am trying to solve a time-dependent linear system with a singular system matrix, $A$, thus an infinite number of solutions, ${\bf x}$(t), exist that satisfy the linear system. The solution I am ...
11
votes
2answers
202 views

Rotational Averaging of Image Periodograms (FFTS)

I'm writing a code to do rotational averages of image FFT's. I have a working version but it is pretty slow. Wondering if anyone has any thoughts on a way to do this more efficiently. Data looks ...
1
vote
1answer
106 views

Help to solve the equation with RungeKutta method [closed]

I need to solve this equation. v'[t] + v[t] == 1/(1 + Exp[-v[t]]) I tried to solve it using RungeKutta method described in Wolfram ...
0
votes
0answers
29 views

NMaximize not satisfying binary constraint

I'm solving an optimization problem in Mathematica with binary integer constraints. It works alright with other constraints. But the only problem is that both NMaximize and NArgMax are not treating ...
-1
votes
1answer
43 views

Are there a function to choose the greatest value in a discrete function? [closed]

Supose a discrete function show 1st, 2nd,...6th value are h = {5, 4, 2, 8, 9, 1} And I want to find the maximun in the subset of indexes 1,3,5,6 (what are ...
0
votes
0answers
54 views

inequalities in equations and constraints

Say That I have the constraint: .5<x1<x2<x3<x4<40 I want to use this constraint in a Nminimize function. It seems that mathematica runs into a ...
3
votes
1answer
98 views

What does LinearModelFit depend on except for its' arguments?

I thought this would be always true, but most likely it returns false. ...
2
votes
0answers
49 views

How to reduce notebook or CDF file size with many images in it? [duplicate]

We love to use Mathematica notebooks to keep our notes, so we import lot of scanned photos into notebooks. However, the nb file size goes crazy large after importing photos in it. For example, ...
2
votes
1answer
94 views

How to use Maximize correctly

I would like to Maximize this fairly simple expression ...
0
votes
0answers
94 views

Constrained maximum likelihood

Trying to solve a MLE with nonlinear constraints that need to be satisfied. However, the given solution do not match the constraints. Am I doing it correctly? ...
0
votes
0answers
91 views

How do I find where the maximum is?

I have a function given by: ...
1
vote
0answers
59 views

Optimization problem test suites

Mathematica provides nonlinear, unconstrained test problems here: Needs["Optimization`UnconstrainedProblems`"] and LP test problems here: ...
1
vote
1answer
240 views

Understanding execution time in nested loops

I have the following simple code ...
0
votes
0answers
646 views

Fastest way to create a NxNxNxN dimensional matrix

I have a function that outputs a complex number Func[x_,y_]:= blah blah; I have constructed a table of all possible values of this function. ...
0
votes
0answers
51 views

FindRoot to find numerical solution of a given index

I want to find solutions of a system of multivariate nonlinear equations of a specific index (i.e., the no. of positive eigenvalues of the Jacobian evaluated at the solution). I know the FindRoot ...
0
votes
0answers
43 views

How to obtain all minima? [duplicate]

If you Solve an equation, you obtain all solutions. But If you NMinimize a function, you only get one minimum. The question ...
0
votes
1answer
72 views

How to save numbers that are in Mathematica messages

I have a program that calls FindDistributionParameters and I get the Mathematica message FindMaximum::eit each time I call the function. The message is FindMaximum::eit: The algorithm does not ...
-1
votes
1answer
56 views

How to fit one parametric array to another numerical array?

I have two arrays of length n. One of them is obtained by experiment, so every element of the array is a number. The other array is parametric, each element is a ...
1
vote
1answer
238 views

Solving a System of four equations (with logs) [closed]

I am trying to solve a system of four equations in four variables. I have read a number of threads on similar issues and tried to follow the suggestions. But I think it is a bit messy because of the ...
0
votes
1answer
78 views

LinearProgramming and Maximize giving different results [closed]

I'trying to do an embarrassingly simple linear programming problem, and being a total Mathematica and maths analphabet I'm stuck. The problem is to optimize (maximize) the function $1.2x+y$, with ...
1
vote
0answers
22 views

$H_{\infty}$ optimization of transfer function matrix [duplicate]

I have a two-dimensional $(2 \times 2)$ transfer function matrix like this: $$G(s) = \begin{pmatrix} \frac{1}{xs+1} & \frac{1}{s+0.5}\\ \frac{3}{s+3}& \frac{1}{ys+2} \end{pmatrix} $$ The ...
17
votes
1answer
285 views

How to work with Experimental`NumericalFunction?

This question is intimately connected with previous one: "How to create internally optimized expression for computing with high WorkingPrecision?" Oleksandr R. correctly states in the comment: A ...
1
vote
0answers
78 views

Increase optimization processing speed

As you know, sometimes numerically solving of optimization problems takes several minutes. For this reason 2 question came up to me: 1 - When one is abort the optimization procedure, how it is ...
5
votes
2answers
176 views

Numerical Optimization Methods

I am curious if any one has comments on "specific characteristics" of a problem that will deem it to be best solved by a specific optimization method such as ...
2
votes
1answer
100 views

NMinimize go out of bounds on some linear constraints

I'm trying to minimize a non-linear function of four variables with some linear constraints. NMinimize on Mathematica 8 seems to go out of bounds on some constraints giving complex values of the ...
0
votes
1answer
222 views

NMinimize to optimize function Module

I am using Nminimize for simulation based optimization. I define the objective function (simulation with a variable "a") as a module to be used in the minimization. ...
1
vote
2answers
82 views

Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
8
votes
1answer
124 views

Experimental`NumericalFunction in NMinimize solution

I try to make a number of optimizations using this code: ...
4
votes
0answers
135 views

Simulated Annealing Parameters and Results

I am using SimulatedAnnealing method for a simulation based optimization problem and was wondering if someone can enlighten me on the following features: Is there ...
6
votes
1answer
425 views

Simulated Annealing Convergence

I am using Simulated Annealing method for a simulation based optimization of a process that has 3 variables, using NMinimize. I print the input/output during every ...
0
votes
1answer
83 views

Trouble with NMaximize

I am having trouble with maximizing a function I am interested in. Below is the code I am using. ...
4
votes
2answers
180 views

How to set up and minimize a large system of equations to resolve the individual components

I am trying to set up a system of 400*N equations to deconvolute spectral data for four different compounds. I monitored 400 different wavelengths in N solvents (3 solvents in this case). In order ...
1
vote
0answers
78 views

DifferentialEvolution scaling factor randomization

Using NMinimize for finding global minima, one can choose the DifferentialEvolution method. You can find a (not so) detailed ...
3
votes
2answers
217 views

Convert number to exponent form with highest power possible

As a school assignment we have to write a program which solves this issue. Since the program has to run efficient I am wondering what the best way is to approach this issue. Of course there you can ...