Question

At time t 0, when a rockets engine shuts down, the rocket has reached an altitude of 500 m and is rising at a velocity of 12

matlab program
0 0
Add a comment Improve this question Transcribed image text
Answer #1

the matlab code is written following the steps a to d in the question. array is created in the first step manually, then calculated the height using the formula given in the question, table is created and taken output using simple table command, the column title is edited using the 'VariableNames' command, fprintf is used to print the title of the table. code and the output is given below. (note: every command starts with % is explanations to next command)

Code:

clear all; clc;
% initialization for time
t=[0;2;4;6;8;10;12;14;16;18;20;22;24;26;28;30];
%the height of the rocket
height=-4.9.*t.*t+125.*t+500;
% table created
T=table(t,height);
% fprintf statement
fprintf('The table of height of the rocket v/s time\n')

% to print the table with appropriate column headings
T=table(t,height,'VariableNames',{'time_seconds' 'height_meters'})

Output:

Command Window New to MATLAB? See resources for Getting Started The table of height of the rocket v/s time T time seconds hei

Add a comment
Know the answer?
Add Answer to:
matlab program At time t 0, when a rocket's engine shuts down, the rocket has reached...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT