I have two tensor: x is 2-by-2-by-3, y is also 2-by-2-by-3. Define each frontal slice of tensor is x1 x2 x3,y1,y2,y3. xi or yi are 2-by-2 matrix. How can I do kronecker product between x and y in matlab? What I want to get is kron(x1,y1),kron(x2,y2),kron(x3,y3) in matlab simultaneously without any looping.
相关问题
- Extract matrix elements using a vector of column i
- Reshape matrix by rows
- Non-Conformable Arrays when Doing Matrix Multiplic
- Repeat but in variable sized chunks in numpy
- How do you get R's null and residual deviance
相关文章
- Numpy matrix of coordinates
- How do I append metadata to an image in Matlab?
- C++: How to use unnamed template parameters in cla
- How to compute the power of a matrix in R [duplica
- How can I write-protect the Matlab language?
- Create n by n matrix with unique values from 1:n
- `std::sin` is wrong in the last bit
- SIMD/SSE: How to check that all vector elements ar
This works for arbitrary sizes of
x
andy
:z
. The first two dimensions contain the products of combinations of rows ofx
andy
; the next two contain the products of combinations of columns ofx
andy
; and the fifth is the original third dimension.Code:
This could be one approach -