a)Extract the data from the two columns into separate arrays named time and distance. b) Determine the velocity and acceleration of the rocket. Use a FOR loop or as many as d
1 次查看(过去 30 天)
显示 更早的评论
Time Alt
0 0
1 107.37
2 210.00
3 307.63
4 400.00
5 484.60
6 550.00
7 583.97
8 580.00
9 549.53
10 570.00
11 699.18
12 850.00
13 927.51
14 950.00
15 954.51
16 940.00
17 910.68
18 930.00
19 1041.52
20 1150.00
21 1158.24
22 1100.00
23 1041.76
24 1050.00
a)Extract the data from the two columns into separate arrays named time and distance.
b) Determine the velocity and acceleration of the rocket. Use a FOR loop or as many as desired, nested or not, and two nested IF branching structures to solve the question.
clear memory
clear all
clc
rocket_launch=readmatrix('rocket_launch.xlsx');
time=[rocket_launch(:,1)]';
distance=[rocket_launch(:,2)]';
for k=1:length(time)
for j=1:length(distance)
end
end
i'm not quiet sure how to write the two nested if branching structure inside the for loop structure
2 个评论
James Tursa
2022-9-29
编辑:James Tursa
2022-9-29
How are you instructed to calculate velocity and acceleration? By differencing points? By curve fitting with the rocket equation and differentiating the curve? What is the method you discussed in class?
采纳的回答
James Tursa
2022-9-30
Hints for using a difference method:
Velocity = ΔPosition / ΔTime
Acceleration = ΔVelocity / ΔTime
To get the delta values, just subtract adjacent points.
更多回答(0 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!