Tag Info

Hot answers tagged

4

One way is shown below. Alternatives include using Simplify with Assumptions, again on testing that the eigenvalues are nonnegative. Resolve[ ForAll[p, 0 <= p <= 2, And @@ Thread[ Eigenvalues[{{1, 0, 0, Sqrt[1 - p]}, {0, 0, 0, 0}, {0, 0, p, 0}, {Sqrt[1 - p], 0, 0, 1 - p}}] >= 0]]] (* Out[9]= True *)


4

Here's a simple way to enumerate all the conditions: fs = {x, y, z, 0}; conds = Table[{Equal @@ fs1, And @@ Table[First@fs1 >= f, {f, Complement[fs, fs1]}]}, {fs1, Subsets[fs, {2}]}] (* {{x == y, x >= 0 && x >= z}, {x == z, x >= 0 && x >= y}, {x == 0, x >= y && x >= z}, {y == ...


3

I believe the reason for the confusion is the way the Dot product operates. It is a Flat but non-commutative operation when the factors aren't just vectors. In particular, it contracts the last index of the first factor with the first index of the next factor, going from left to right. But in the form $a\cdot\varepsilon\cdot b$, this means that the ...


3

Small example on 5x5 matrix: pp = Table[p[i, j], {i, 5}, {j, 5}] One way: pp[[#, #]] &@Insert[Rest@Range[5], 1, -2] Or another: pp[[;; 4, ;; 4]] = RotateLeft[pp[[;; 4, ;; 4]], {1, 1}];


2

I have toyed with code (notice that I use only first solution for Replace). eqs = {S Mex'[ t] == ω e Mey[t] + λ ω e Mny[ t] - Γ R e Mex[t], S Mey'[t] == -ω e Mex[t] - λ ω e Mnx[ t] - Γ R e Mey[t], Mnx'[t] == λ ω n Mey[t] + ω n Mny[ t] - Γ Rnt Mnx[t], Mny'[t] == -λ ω n Mex[t] - ω n Mnx[ t] - Γ Rnt Mny[t], Mex[0] ...


1

I assume by nicer looking you means something easy to read. Does this work? m = {{0.25, 0.15, 0.75}, {0.65, 0.7, 0.1}, {0.1, 0.15, 0.15}}; TableForm[#2, TableHeadings -> {#1}] & @@ Eigensystem[m]


1

Any square matrix can be put into Jordan normal form via a similarity transformation; and for a matrix in Jordan normal form, the geometric and algebraic multiplicities of the eigenvalues are determined by its block structure. So you could take the following approach: generate a Jordan matrix with the appropriate multiplicities, and then perform a random ...


1

I'm a bit late coming in here with this, but let there be a different approach anyway. It so happens, that the permutation you describe is simply Cycles[{Range@20}]: Permute[Range@21,Cycles[{Range@20}]] (* {20, 1, 2, ..., 19, 21} *) With mat = Table[p[i,j],{i,0,20},{j,0,20}] You can try this: Transpose@ MapAt[Permute[#, Cycles[{Range@20}]] &, ...



Only top voted, non community-wiki answers of a minimum length are eligible