Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Matlab, how do I: Create and attach a program that will solve the following:

ID: 3770973 • Letter: I

Question

In Matlab, how do I:

Create and attach a program that will solve the following:

Have a user input masses for two interstellar objects, and calculate the gravitational force between the objects using Newton's Law of Universal Gravitation, Eqn 1, as the radius varies from 4 km to 400 km. Where F is the gravitational force, G is the gravitational constant, m1 and m2 is the two masses respectively, and r is the radius between the objects. G = 6.674x10-11 N(m/kg)2.

Also, output a graph of the gravitational force of the problem over the indicated domain of the radius.

Explanation / Answer

matlab code :

function grav_force()
m1=input('m1: ');
m2=input('m2: ');
function y=gf(r1)
y=(6.674*power(10, -11)*m1*m2)/(r1*r1);
end
fh=@gf;
fplot(fh,[4,400]);
end

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote