Tensor creation like "pageTensorprod"?
3 次查看(过去 30 天)
显示 更早的评论
I have two 3x3xN tensors (let's call them A and B) which I would like to combine into a 3x3x3x3xN tensor.
More specifically I want to compute : C_ijklm = A_ijm B_klm
right now I am reshaping A and B into 9x1xN and 1x9xN arrays and I then use pagemtimes (or simply .* with singleton expansion) to generate the 9x9xN which is finally reshaped.
Is there an easier way? The resulting code lacks readability in my opinion.
I have read the tensorprod documentation but I don't see how I could use it. I would need some kind of "pageTensorprod" i think.
Thanks for any advice.
Adrien.
采纳的回答
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!