MATLAB: How to move set of points diagonally

diagonal

Hello all , I have a 3D matrix (of a particular dimension). we can move points in either x or y or z directions by adding some constants but how to move the points in diagonal direction (in planes , say x-y plane) ? thank you

Best Answer

Add the offset to both (or all 3) coordinates...
x(i+di;j+dj,k+dk)=x(i,j,k)