Question: USING MATLAB: A. Write a function that creates a structure variable called createspacecraft. The function should take four inputs, a number called mass (in kg),
USING MATLAB:



A. Write a function that creates a structure variable called createspacecraft. The function should take four inputs, a number called mass (in kg), a number called fuel (in joules of energy) a number called orbit (in meters), and a number called engine in newtons. It should return an output structure called spacecraft containing each of those values. Please ensure that both the function name, AND the names of variables within the spacecraft structure are exactly as instructed B. In order to stay in a stationary orbit, spacecraft need to be traveling at a certain velocity. That velocity is given by the formula: Vorbitrbit +Te Where G is the gravitational constant 6.67 x 10 m'/s? kg, me is the mass of the earth, 5.98 1024 kg, re ls the radius of the earth, which is 6,370,000m, and orbit is the height of the orbit above the planet. Write a function called gravCalc that takes an orbital height as an input and returns a velocity as an output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
