Question: NEEDS TO BE IN MATLAB SCRIPT AND USE A for loop WITH AN if OR while STATEMENT TO LOOP THROUGH TIME. NEED TO USE PHYSICS
NEEDS TO BE IN MATLAB SCRIPT AND USE A "for loop" WITH AN "if" OR "while" STATEMENT TO LOOP THROUGH TIME. A rocket launches with an initial mass of 10,000 kg, an acceleration due to the rocket of 20 m/sec 2, and 4,000 kg of fuel. It burns 50 kg of fuel each second. Write a MATLAB program to calculate and plot its velocity versus time. Things to consider: Use a "for loop" with a nested "if statement" or a "while" statement to loop through time Use the physics equations for velocity and acceleration Remember to include the force of gravity Remember to stop firing the rocket when you run out of fuel Your program must output the final velocity to the screen (use the "fprintf" or "disp" commands.) and make a plot
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
