[xp,yp,zp]=rotaboutz(x,y,z,t) Rotate cart coord about z axis by angle t
0001 function [xp,yp,zp]=rotaboutz(x,y,z,t) 0002 % [xp,yp,zp]=rotaboutz(x,y,z,t) 0003 % 0004 % Rotate cart coord about z axis by angle t 0005 0006 sint=sin(t); cost=cos(t); 0007 0008 xp=+cost.*x+sint.*y; 0009 yp=-sint.*x+cost.*y; 0010 zp=z; 0011 0012 return