# Tag Info

1 vote

### Symbolic scalar-by-matrix derivative

I tried the NCAlgebra package: << NC; << NCAlgebra; SNC[X, A] NCGrad[tr[tp[tp[X] ** A] ** (tp[X] ** A)], A] And ...
• 1,616
Accepted

### Inverse of a matrix with symbolic variables

Replacing all machine-precision numbers by exact numbers: ...
• 35.6k

### How to solve this equation of n-order matrix?

Does this work for you? ident[i_, j_] := KroneckerDelta[i, j] jmat[i_, j_] := 1 mmat[i_, j_] := (k - \[Lambda]) KroneckerDelta[i, j] + \[Lambda] then: ...
• 2,058

### Timing for generating long matrix

This seems to produce the correct result and is much faster for small values of n. ...
• 94.7k
Accepted

### Timing for generating long matrix

I suspect you only want to optimize the last line, i.e. I haven't bothered speeding up s. In what follows I'll use the first 1000 x 1000 submatrix to show some ...
• 3,880

### How to approximate a function using B-spline interpolation?

B splines are already built into MMA. To expand Sin[x] over the region 0 o 2 Pi into B splines of degree d=3 we choose a basis of b splines with uniform knots at a distance of 1/(d+1): ...
• 24.1k
Accepted

### How do I create and combine column matrices from lists

Mathematica uses the list for almost everything. You can think of a list as a row for now for purposes of making matrices. So when you write ...
• 108k
1 vote

### Is there a way to apply a two-argument function to matrices?

Is the following application of MapThread with a level specification what you are looking for? ...
• 58.3k

### How does NDSolve treat matrices?

An alternative to Indexed to deal with matrices is to prevent f from evaluating until a matrix value is substituted for ...
• 213k

### How does NDSolve treat matrices?

I think that what you want to do with your broken code : f[rho_,t_]:=Table[rho[[n,m]],{n,1,2},{m,1,2}]Cos[t] is something similar to this code : ...
• 16.9k

### How to Create an Efficient Word Square Algorithm?

I have created an algorithm that takes about 2.4 seconds to find the word squares for "hair" and 10.5 seconds for "dogs". ...
• 1,037

### NDSolve: there are more variables than equations, underdet

There are several typos in the code. First, initial data array probably should be in a form ...
• 33.7k
Accepted

### Derivative of quadratic form in NCAlgebra

As noted in the documentation of NCGrad: IMPORTANT: The expression returned by NCGrad is the transpose or the adjoint of the standard gradient. This is done so ...
• 1,541

### Looking for a efficient way of solving a matrix which is function of some variable

Maybe you could use FindRoot? The trick is to know how to differentiate the determinant of a matrix, which is: \frac{d \det (g(x))}{dx} = \det\left(g(x)\right) \ \...
• 123k
1 vote
Accepted

### Total Spin Matrix Squared (Casimir Operator)

Compute Dot[#,#] for each element # of the list and then sum up the results?! ...
• 2,240
1 vote

### Looking for a efficient way of solving a matrix which is function of some variable

The type of dependence in f is critical here. For your example, it amounts to calculating a generalized eigenvalue. ...
• 1,541

### Invert a generic n x n matrix

Clear["Global`*"] For the given example of DiagonalMatrix[n*Range[n]], the Inverse...
• 119k
1 vote

### Help with equation within adjacency matrix

You could use, for instance: {i, j} = Transpose[List @@@ edges]; truedistance = scalefactor Sqrt[Total[Abs[coordinates[[i]]^2 - coordinates[[j]]^2], {2}]]; If you ...
• 94.7k
Accepted

### Insert a dynamic vector into a matrix

Maybe like this: NN = 3; n = 6; Flatten /@ (IdentityMatrix[n] /. 1-> Cs[NN])
• 30.4k

### Insert a dynamic vector into a matrix

I think you need to minimally modify your code using Sequence in a ReplaceAll. ...
• 5,684
1 vote

### Insert a dynamic vector into a matrix

This method uses SparseArray and Band ...
• 11.4k