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"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 EQUATIONS FOR VELOCITY AND ACCELERATION.
NEED TO INCLUDE THE FORCE OF GRAVITY.
THE ROCKET STOPS FIRING WHEN IT RUNS OUT OF FUEL!
PROGRAM MUST OUTPUT THE FINAL VELOCITY ("fprintf" or "disp") AND MAKE A PLOT.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!