3D matrix rotation
Y=wrot3(x,M,N)
double 3D matrix
M is for rotation direction: 0 is for null rotation (row, col, slice), 1 for (column,row,slice), 2 for (row, slice, column), 3 for (slice, row, column), 4 for (column, slice, row), 5 for (slice, column, row).
forward or reverse, 0 for forward, 1 for reverse.
fliping result
wrot3 is a 3D matrix rotation utility function on time domain. wrot3(X,M,0) is for rotation on the direction indicated by M and could be converted back by wrot3(wrot3(X,M,0),M,1).
a=rand(3,3,3); Y=wrot3(a,2,0); | ![]() | ![]() |