# 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 ...
Accepted

### Inverse of a matrix with symbolic variables

Replacing all machine-precision numbers by exact numbers: ...

### 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: ...

### Timing for generating long matrix

This seems to produce the correct result and is much faster for small values of n. ...
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 ...

### 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): ...
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 ...
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? ...

### 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 ...

### 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 : ...

### 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". ...

### 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 ...
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 ...

### 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) \ \...
1 vote
Accepted

### Total Spin Matrix Squared (Casimir Operator)

Compute Dot[#,#] for each element # of the list and then sum up the results?! ...
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. ...

### Invert a generic n x n matrix

Clear["Global`*"] For the given example of DiagonalMatrix[n*Range[n]], the Inverse...
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 ...
Accepted

### Insert a dynamic vector into a matrix

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

### Insert a dynamic vector into a matrix

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

### Insert a dynamic vector into a matrix

This method uses SparseArray and Band ...