# All Questions

36 questions
Filter by
Sorted by
Tagged with
1answer
38 views

### How can I specify the region for every variable simultaneously in NMinimize?

I want to use NMinimize to find the unknown unitary matrix that solves a (possibly nonlinear) matrix equation. For example, the one that transforms the Pauli matrix ...
2answers
108 views

### Programming with Mathematica Syntax - Dunford decomposition

I am always amazed while I am reading some solutions of problems in mathematical problems of this site with Mathematica. For instance, look at the problem 48. Whereas I am writing 100 lines of code ...
3answers
98 views

### Find k largest edges with unique nodes (kind of maximum weighted matching)

I have a weighted graph, and I am interested to find k largest edges with unique nodes. Currently, I do it in the following manner ...
1answer
148 views

### How to sort Matrix

I am on permutation project, and I have trouble with my result, the sequence of my result is not same with Permutations in Mathematica here the code ...
1answer
152 views

### Find maximum of the norm of matrix

g = 0.9; H = {{g, I}, {I, -g}}; G = MatrixExp[t*H]; Plot[Norm[G], {t, 0, 20}, AspectRatio -> 1] FindMaxValue[Norm[G], {t, 1}] The matrix has a parameter t. ...
2answers
125 views

### How to efficiently optimize a strictly increasing linear function over convex set

I am trying to minimize the trace of a symmetric matrix $B$ fulfilling $x^T A_i x \leq x^T B x \ \forall x \forall i$ for given (in general) indefinite symmetric matrices $A_i, i = 1, ..., n$. The ...
1answer
52 views

### Minimize matrix column totals

I would like to pick up n (2 in example) columns from matrix. The sum/total of these columns should be minimal. ...
1answer
135 views

### How to improve the speed of NMaximize function

My problem is as follows: Consider a 5*5 matrix Obj with 0 and 1 Obj = Array[x, {5, 5}]; The objective function is: ...
1answer
50 views

### Specific aggregation of matrix elements

Let us consider the matrix 'x1': x1 = {{1, 2, 3, m}, {4, 5, 6, n}, {7, 8, 9, o}, {10, 11, 12, o}} MatrixForm[x1] From the matrix 'x1' we compute the matrix 'x2':...
2answers
555 views

### Differentiating functions of vectors/matrices?

I'm dealing with derivatives of scalar functions of matrices and wondering if Mathematica can help me here. The standard approach of expanding it in terms of components is cumbersome. As an ...
1answer
64 views

### Finding a column from Max comparing each element of two columns; subsequent column used for backward calculation

I have lensp=21; rho=0.975; e1=0; pid= 0.5212; qid=0.4788; tid=10; based on my own calculations I have given vectors of dimension ...
3answers
204 views

### Defining a function for the construction of a bordered hessian

I think in Mathematica the omission of a function that can create a bordered matrix. This code works ...
2answers
84 views

### An optimization problem involving the calculation of MatrixRank as a constraint

I am dealing with an optimization problem that involves the rank of a matrix as a hard constraint. I am starting with this simple example ...
1answer
67 views

### An optimization problem involving the calculation of MatrixRank gets wrong

I was trying to solve an optimization problem involving rank of a matrix and experimenting with a very simple one. A 2x2 matrix which contains only one parameter a11...
1answer
315 views

### Optimize a parametric matrix to get a lowest possible eigenvalue

This question is a followup of Plot the lowest eigenvalues of a parametric matrix Now I can get the lowest eigenvalue LowEign(t) of the matrix for a given t numerically. When I plot the LowEign ...
2answers
513 views

### Find the minimum element of a row of a matrix and its column index for each row

I am trying to find the minimum value of a row of a matrix and its corresponding column. Please run the code below. OptV is the matrix that I would like to create which must give the output of the ...
5answers
855 views

### Indicate minimal path sum

Described on the page: http://www.mathblog.dk/project-euler-81-find-the-minimal-path-sum-from-the-top-left-to-the-bottom-right-by-moving-right-and-down/ It is an example of the solution indicated in ...
1answer
670 views

2answers
825 views

### Optimizing functions taking matrix arguments

I'm looking for general information on how to optimize matrix valued functions, I have the following function I'm looking to maximize (or figure out if this is possible at all). ...
1answer
745 views

...
1answer
617 views

### How can I fit a matrix function with multiple variables to given eigenvalues?

I have a 5x5 matrix function H[kx] ...
2answers
1k views

### Obtain approximate Hessian using FindMinimum

According to the documentation, when FindMinimum is told to use the method "QuasiNewton" on a unconstrained problem, it uses the ...