Question: M M2 M Write a MATLAB function named gravForce that will compute the magnitude of the gravitational force between two objects of the same mass

M M2 M Write a MATLAB function named gravForce that will compute the magnitude of the gravitational force between two objects of the same mass given three input variables: 1. the xy coordinate of the center of the first object as a 1x2 matrix 2. the xy coordinate of the center of the second object as a 1x2 matrix 3. the mass of each object The return of the function should be a single output containing the gravitational force. To compute gravitational force, Fg, use the equation shown in the figure: G is the gravitational constant = 6.67e-11 d is the distance between the two objects M is the mass of each object Notes: Example test case: Fg = gravForce([3,2],[6,7],100) results in Fg=1.9618e-08 Do not include any test cases in the answer you submit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
