function newpoints = ApplyTransformation(points,T) rot = T(1:3,1:3); tran = T(1:3,4); newpoints = zeros(size(points)); for i = 1:size(points,1) p = points(i,:); p = p'; p = rot * p + tran; newpoints(i,:) = p'; end