rotating a tensor where the tensor elements are functions of a third index (conceptually)
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a 3x3 tensor "A" where the elements are a functions of wavelength (e.g. 1000 deep). I need to rotate the tensor, R*A*R', then do other operations. Here R is the usual 3x3 rotation matrix. It would be most convenient to have the tensor look like:
A = [ axx(k), 0(k), 0(k);
0(k), ayy(k), 0(k);
0(k), 0(k), azz(k) ];
I can do all this my looping over k and treating each k-layer as a 3x3, but is there a better way?
There are really 2 questions.
1) Is there a more efficient way to load the 3x3xk array from 1D vectors of axx(k), ayy(k), and azz(k), compared to constructing each k-layer one at a time in a for loop?
2) Is there a way to do the rotation of A (the 3x3xk matrix) without doing the rotation one 3x3 layer at a time in a for loop?
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!