Vectors and DisplaceIpent Matlab Help

Vectors and DisplaceIpent 

Suppose two divers start at the surface and establish the following coordinate system: x is to the west, y is to the north, and ; is down. Diver I swims 55 ft west, 36 ft north, and then dives 25 ft. Diver 2 dives 15 ft, then swims east 10 ft and then north 59 ft. (a) Find the distance between diver 1 and the starting point. (b) How far in each direction must diver 1 swim to reach diver 2? How far in a straight line must diver 1 swim to reach
diver 2?

 Solution ,
(a) Using’ the’ xyz coordinates selected, the position of diver 1 is r = 55i + 36j +’25k, and the position of diver 2 is r = -2Oi + 59j + 15k. (Note that diver 2 swam east, which is in the negative x direction.) The distance from the origin of a point xyz is given by ..; x2 + y2 + Z2, that is, by the magnitude of the vector pointing from the origin to the
point xyz. This distance is computed in the following session. »r = [55,36,25];w = [-20,59,15];
»dist1 = sqrt(sum(r.*r)) . :iist1 =
70.3278 The distance is approximately 70 ft.
(b) The location of diver 2 relative to diver 1 is given by the vector v pointing from diver 1 to diver 2. We can find this vector using vector subtraction: v = w – r. Continue the above MATLAB session as follows:
»v = ••.-.. r ‘I.’ ::::
-75 »dist2
ist2 = 79.0822
23 -10 sqrt (sum (v.*v) )
Thus to reach diver 2 by swimming along the coordinate directions, diver 1 must swim 75 ft east, 23 ft north, and 10ft up. The straight-line distance between them is approximately 79 feet.

Posted on July 30, 2015 in Numeric Cell And Structure Arrays

Share the Story

Back to Top
Share This