7
votes
Accepted
Efficient computation of a matrix times its transpose
Edit and Warning: I noticed that my timing may not have been quite correct, or at least has to be interpreted carefully, please see the edit.
As @Roman points out, one should check if one really has ...
6
votes
Accepted
VectorAround problem
Its hard to say if this answers it for you since it seems to be version dependent and my current 12.3 runs error free.
But i had these error often before. It got better in 13.1. for me. Essentially ...
6
votes
Accepted
Proof of symbolic matrix
TensorExpand[
f[G, H] == Subscript[k, 1]*f[A, H] + Subscript[k, 2]*f[B, H]]
(* True *)
4
votes
Accepted
Calculating power series of quantum operators on kets
The reason is simple: this package uses CenterDot as multiplication, while Series of Exp ...
4
votes
Accepted
Calculating the matrix product of the elements of a table
The For-loop given by OP can be replaced by Map as follows:
...
4
votes
Accepted
Minimize Sum of Hamming Distances
Keep agreement[] from evaluating on symbolic y with the _?... pattern tests. Also total up ...
2
votes
Accepted
2
votes
Converting a list of values to a criterion
If instead of a selector list that was integers you had a selector list that was named patterns, it would work very easily. So, given,
...
2
votes
How to solve this equation with rank relation of matrix
I have made a MatrixRankSym feature with symbolic computation here. And we can use it directly:
For your first equation:
...
2
votes
How to solve this matrix equation
I have made a MatrixRankSym feature with symbolic computation here. And we can use for this question directly:
...
2
votes
Manipulating a Haar random unitary matrix and computing probabilities
Code to calculate the probabilities when $U$ is a $2^n \times 2^n$ unitary matrix:
...
2
votes
Accepted
Proper usage of Assuming statement
As described in the comments and the documentation, Assuming evaluates an expression with new assumptions appended to ...
1
vote
How to make a matrix a set of variables to be manipulated?
Maybe this is what you are looking for:
f = Array[a, {2, 2}];
Manipulate[Evaluate[f], {a[2, 1], 0, 1}]
Now you have one slider that adjusts the value of a[2,1] ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
matrix × 3192linear-algebra × 749
list-manipulation × 726
performance-tuning × 219
equation-solving × 188
eigenvalues × 145
plotting × 129
functions × 112
sparse-arrays × 111
symbolic × 99
tensors × 90
vector × 83
graphs-and-networks × 67
replacement × 65
random × 65
differential-equations × 64
mathematical-optimization × 64
numerics × 60
function-construction × 58
simplifying-expressions × 57
calculus-and-analysis × 52
programming × 45
physics × 43
complex × 42
probability-or-statistics × 39