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

learn more… | top users | synonyms (2)

1
vote
0answers
44 views

What are the differences between these functions when used for NMaximize?

In short, the question is how to construct the function you want to optimize? ...
0
votes
0answers
20 views

Maximization of n-variable and n-constraint in matrix form

I am trying to do some maximization using matrix algebra: very simple one is with n = 3 as the following: ...
1
vote
2answers
73 views

Incorporating the minimum and maximum of the function in a Dynamic plot

I'm working on my project for class and it's supposed to be a graph that can take functions from the user and display it along with finding the max and min of the graph. But I just don't know how to ...
0
votes
0answers
46 views

Konno model (linear programming applied finance ) [on hold]

How Using the model of Konno and Yamazaki ( linear programming model applied finance and alternative to Markowitz model) in wolfram mathematica ? I want to ride a stock portfolio that minimizes risk ...
0
votes
0answers
39 views

How we can find shear and torsion equations for non homogeneous cross sections.? [on hold]

when we use FDM to find torsion of square section with one homogeneous material we can do it easily by mathematica "see the attached file" But what will happened if we have the same cross section with ...
0
votes
0answers
57 views
0
votes
0answers
36 views

3D Ploting in Mathematica Function is getting smeared [duplicate]

A = x^2 + y^2 + Sqrt[x^2 + y^2]; B = x^2 + y^2 - Sqrt[x^2 + y^2]; Plot3D[{B}, {x, -1.5, 1.5}, {y, -1.5, 1.5}] I want to remove this sky blue region from the ...
0
votes
0answers
40 views

NMinimize automatically quits Kernel [closed]

NMinimize quits in the middle of a calculation even though there is plenty of memory on my machine. I am using a For loop to do a bunch of NMinimize calculations. Specifically 80. The code runs up to ...
0
votes
0answers
46 views

NMinimize tries to find the fit to paramters which are not in the objective function

Consider the codes below: fun[x_] := (x - 4)^2 NMinimize[{fun[x]}, {x, y}] it returns: ...
1
vote
1answer
43 views
0
votes
0answers
22 views

I am going mixed [migrated]

Why this is wrong ? $ -1=(-1)^{2/2}=((-1)^{2})^{1/2}=1^{1/2}=1 $ Then $1=-1$
0
votes
0answers
50 views

Constrained Nonlinear Optimization with expectations functions in the constraints

I am modeling an optimal compensation contract with a CRRA utility function : ...
0
votes
0answers
48 views

Optimiazation method L-BFGS-B

I am comparing a result of optimization using R and Mathematica. Mathematica (NMaximize) has found a significantly better (global optimum) result then R (using ...
0
votes
1answer
91 views

Optimizing a System of 5 Equations

I have a system of 5 equations that each define a parameter for a metal I-beam. The common variables are beam width (W), web thickness (Tw), and flange thickness (Tf). I would like to find the best ...
1
vote
0answers
77 views

Mathematica + System Modeler or Matlab + Simulink [closed]

I want to learn control systems(Using Ogata Modern Control Systems Book) and I am not sure in which should I invest : Matlab+Simulink+Control systems = aprox 220 euro Mathematica + Workbench + ...
5
votes
2answers
136 views

Test existence of a path from one side of a graph to another

I'm trying to determine how I can test if a path exists from one side of a graph to another as efficiently as possible. If I have the Lines given by: ...
5
votes
2answers
71 views

Optimization problems over the Integers

Should be an easy question. How can I define a function which gets only integers in a form that I can use to find max and min for instance? Example: Find the Max of the expression ...
-1
votes
0answers
29 views

How to hanlde LinearProgramming if no solution can be found that satisfies the constraints

I have a Linear Programming that sometime it can't find a solution to satisfy the constraints. ...
0
votes
1answer
68 views

Array element problem in optimization

I have the following piece of code in Mathematica: ...
0
votes
1answer
63 views

FindMinimum runs out of Memory

I have a function (its rather long, but does not matter) which when evaluated (1000s of times) runs fine. However, when I try to find its optimal parameters using ...
1
vote
1answer
37 views

Minimization problem in a subset of Complex matrices

I would like to minimize $||\mathbf{A} \rho -v||$ (where $\rho , v$ are fixed vectors) with respect to the matrix $\mathbf{A}$ elements, but with $\mathbf{A}$ in a subset of complex matrices (i.e. ...
4
votes
2answers
383 views

Finding minimal distance between two surfaces

This code will display two parametric surfaces: ...
0
votes
0answers
41 views

Transform NMinimze into LinearProgramming formulation

I have the following maximization problem that I currently try to solve with Minimize/NMinimize. Unfortunately, this kind of solution method takes really long for large systems of equations and ...
2
votes
1answer
70 views

Array in Sum in Minimize - error “Part specification x[1] is neither a machine-sized integer”

Help please M = 10; z = Array[x, M] {x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10]} ...
3
votes
2answers
89 views

NMinimize/NMaximize is unable to generate initial points

Mathematica 10 generates a warning that it is unable to generate initial points for numerical optimization problems. I picked a particularly simple example. The problem goes away when ...
1
vote
0answers
85 views

Is there any way to solve this convex-concave like optimization problem?

This is a bit of a non-standard way of asking a question perhaps but I couldnt even think of writing any code about the following optimization problem. I wonder if it could be at all solvable and if ...
0
votes
1answer
95 views

Optimizing Chi-square distance between two distribution

I want to program the chi-square between two distribution Xu and Vu with length N. This function is defined as below: Xu and Vu are real and positive. ...
1
vote
0answers
59 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
0
votes
0answers
53 views

Improve on timing of NMinimize

I got a little performance problem with the function NMinimize (it takes mathematica approximately 10 minutes to compute the results). Here i s my sample code: ...
0
votes
0answers
54 views

Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a list of the best fit and some worse fits, not just the best fit? This is for a function where the residual function can have several local ...
1
vote
1answer
88 views

Optimization in MMA for time resolved spectroscopy

I want to fit some spectroscopic data with a model. I detect the fluorescence of something over different wavelengths. The detection over each wavelength is one data set in time. The lifetimes of ...
5
votes
0answers
111 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
0
votes
0answers
35 views

How to set the step in NMinimize

I want to fit multiple data sets with 104 variables. I use NMinimize to do that. I minimize the difference between data and my objective function. How can I tell ...
0
votes
0answers
30 views

Optimization of two functions under one common constraint

Is it possible to optimize two functions under one common constraint? So to find the common maximum? For example, Optimization of (* 1 *) x*y^2-x^2 (* 2 *) x*y ...
1
vote
1answer
69 views

Matlab's command counterpart in MMA

Matlab has a command that when is used in fminsearch shows the value of the function which we want to minimize and so gives a trend of values calculated for the ...
0
votes
0answers
41 views

Speed up numerical optimization (for plotting and solving)?

Briefly speaking, I want to plot a function PIfun[], which its value is based on numerical optimization using NMaximize. It ...
0
votes
2answers
57 views

A constraint to RandomReal for sum of numbers equal to arbitrary n

I want to generate some random numbers but respect a constraint. So I use RandomReal[{0,1},N,WorkingPrecision -> 2] I want to fix a constraint in order ...
0
votes
0answers
31 views

NMinimize outside the feasible region

I got the following minimization problem. I get a solution if I set constraints1 := L.x >= y; and eliminate constraint 2 from my set of constraints. So ...
0
votes
0answers
41 views

Add constraints to a variable number of parameter in Minimize

i want to use Minimize with a variable number of Parameter which works fine: ...
1
vote
0answers
52 views

NMinimize: Problem with constraints + Simultaneous minimization possible?

Introduction Dear all, I am fairly new to Mathematica. Recently I am trying to do the following: I have a function $$\textrm{hann}[t,t_g,n_m]=\sum\limits_{n=1}^{n_m}a_n\left[1-\cos\left(\frac{2\pi ...
0
votes
0answers
55 views

Minimization of a non-linear objective function subject to linear constraints

I have solved a linear program in Mathematica using the LinearProgramming function with arguments of the form LinearProgramming[c,m,{{b1,s1},{b2,s2},...}] i.e. ...
2
votes
1answer
51 views

Working precision and pure functions in FindMinimum

I have this function: fun = (# - 5.0)^2.0 & Then, I want to find the minimum: ...
8
votes
1answer
151 views

What is the difference between FindFit and NonlinearModelFit

I cannot get the difference between these two fitting functions in Mathematica. I even read in MMA that the result of these two are the same.
2
votes
0answers
63 views
6
votes
3answers
203 views

How to use a compiled function in numerical optimization

I'm trying to wrap my head around function Compile. So, this is a spin-off question from: a previous question on using compile[] correctly. I have a function that ...
2
votes
1answer
66 views
7
votes
4answers
284 views

Finding the point of minimum distance between two parametric functions

I have two functions re and rm, for which I computed the minimum distance between them. Now I would like to add a point at the ...