Then use comet function to draw the orbits Use different col

Then use comet function to draw the orbits. Use different colors for each planet.
Planet AU 0.4 Mercury Venus 0.7 Earth 1.0 Mars 1.5 Jupiter 5.2 Saturn 9.5 Uranus 19.2 Neptune 30.1

Solution

% declaring variables
terrPlanet_scaling = 1.2e3;
gasPlanet_scaling = 2.5e2;

% planet Sun
Sun.M = 1.99;
Sun.R = 6.96e8*0.005;
Sun.RGB = [1 0.6 0];
comet(6.96)

% planet mercury
Mercury.M =3.30;
Mercury.R = 0.4*terrPlanet_scaling;
Mercury.RGB = [0.5 0.4 0.4];
comet(0.4)

% planet venus
Venus.M = 4.87;
Venus.R = 0.7*terrPlanet_scaling;
Venus.RGB = [1 0.8 0.1];
comet(0.7)

% planet earth
Earth.M = 5.97;
Earth.R = 1*terrPlanet_scaling;
Earth.RGB = [0.3 0.5 0.7];
comet(1)

% planet mars
Mars.M = 6.42;
Mars.R = 1.5*terrPlanet_scaling;
Mars.RGB = [0.5 0.3 0.4];
comet(1.5)

% planet jupiter
Jupiter.M = 1.90;
Jupiter.R = 5.2*gasPlanet_scaling;
Jupiter.RGB = [0.7 0.1 0.3];
comet((5.2)

% planet saturn
Saturn.M = 5.68;
Saturn.R = 9.5*gasPlanet_scaling;
Saturn.RGB = [1.1 1 0.1];
comet(9.5)

% planet uranus
Uranus.M = 8.68;
Uranus.R = 19.2*gasPlanet_scaling;
Uranus.RGB = [0.4 0.7 0.8];
comet(19.2)

% planet neptune
Neptune.M = 1.02;
Neptune.R = 30.1*gasPlanet_scaling;
Neptune.RGB = [0.3 0.6 0.9];
comet(30.1)

Then use comet function to draw the orbits. Use different colors for each planet. Planet AU 0.4 Mercury Venus 0.7 Earth 1.0 Mars 1.5 Jupiter 5.2 Saturn 9.5 Uran
Then use comet function to draw the orbits. Use different colors for each planet. Planet AU 0.4 Mercury Venus 0.7 Earth 1.0 Mars 1.5 Jupiter 5.2 Saturn 9.5 Uran

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site