//clear// //Caption:Program to find the unit vector //Example1.1 //page 8 G = [2,-2,-1]; //position of point G in cartesian coordinate system aG = UnitVector(G); disp(aG,'Unit Vector aG =') //Result //Unit Vector aG = // 0.6666667 - 0.6666667 - 0.3333333