New answers tagged

0

How about: rankTensor[ranks_] := Module[{x}, Fold[Table[#1, #2] &, x, ranks] /. x :> RandomReal[]] Then In[19]:= rankTensor[{2, 3, 4}] Out[20]= {{{0.604317, 0.417602}, {0.66135, 0.40658}, {0.34705, 0.830708}}, {{0.941604, 0.286638}, {0.330288, 0.176155}, {0.516489, 0.395396}}, {{0.881244, 0.568469}, {0.4826, 0.13277}, {0.243761, ...


0

Since you say that you still do not get the output you desire using KroneckerProduct, I am guessing that you should try restarting the kernel. In any case, this should also fit your needs: mat1 = Array[m1, {2, 2}]; mat2 = Array[m2, {2, 2}]; KroneckerProduct[mat1, mat2] // MatrixForm


0

Perhaps X = IdentityMatrix[2] Y = Array[y, {2, 2}] TensorProduct[X, Y] // MatrixForm $\left( \begin{array}{cc} \left( \begin{array}{cc} y(1,1) & y(1,2) \\ y(2,1) & y(2,2) \\ \end{array} \right) & \left( \begin{array}{cc} 0 & 0 \\ 0 & 0 \\ \end{array} \right) \\ \left( \begin{array}{cc} 0 & 0 \\ 0 & 0 \\ \end{array} ...


1

Here is how I would literally translate the definitions: Q = {{n1[x, y, t], n2[x, y, t]}, {n2[x, y, t], -n1[x, y, t]}}; r = {x, y}; p1[α_, β_] := Sum[D[Q[[γ, ϵ]], r[[α]]] D[ Q[[γ, ϵ]], r[[β]]], {γ, 1, 2}, {ϵ, 1, 2}] p3[α_, β_] := Sum[Q[[γ, ϵ]] D[ Q[[α, β]], r[[ϵ]], r[[γ]]], {γ, 1, 2}, {ϵ, 1, 2}] p2[α_, β_] := Sum[D[Q[[γ, ϵ]], r[[γ]]] D[ Q[[α, β]], ...



Top 50 recent answers are included