This is an excerpt from the article https://www.sciencedirect.com/science/article/abs/pii/S0094114X10000418.
How do I write this using vector-matrix operations (TensorProduct
or KroneckerProduct
or other) in Mathematica?
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityThis is an excerpt from the article https://www.sciencedirect.com/science/article/abs/pii/S0094114X10000418.
How do I write this using vector-matrix operations (TensorProduct
or KroneckerProduct
or other) in Mathematica?
D[A,{X}]
will do it because D
already operates on all elements of the matrix and the {X}
argument (grad) will differentiate w.r.t each part of X
. But you'll need to flatten each row to get the form you want:
n = 2; m = 3;
X = Array[x, n]
A = Array[a[#1, #2] @@ X &, {n, m}];
(Flatten /@ D[A, {X}]) // MatrixForm
Grad
or $\nabla$ as this is applied to every entry in the matrix.
$\endgroup$