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

조회 수: 2 (최근 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
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
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개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by