Aircraft deplaning and centre of gravity

5 次查看(过去 30 天)
Hi guys, I have the following so far:
a=30;
b=3;
A=rand(a,b)<0.85;
B=zeros(30,1);
C=A;
D=[A B C]
I am working on aircraft deplaning and how the centre of gravity changes when passengers start to deplane the aircraft. I am simulating the A320 as a 30*7 matrix as it can be seen from the above. I am new to Matlab and would like to know how to perform the following:
1-the 30*7 matrix shows passengers seated in different seats where 1 is and empty seats are zeros. I want to simulate passengers getting off the aircraft and the ones become zeros. 2- a code that can calculate and track where the centre of gravity is and how it changes with respect to time.
Any help is very highly appreciated because I am stuck and need help with it.
Regards,

采纳的回答

Walter Roberson
Walter Roberson 2016-9-6
You cannot meaningfully calculate changes in center of gravity without modeling the existing weight distribution of the fixed portions, and the weight of the individual passengers (including luggage), and indeed the dynamic motion of the passengers moving through the plane, taking into account that they never simply deplane one at a time with the others staying seated until the previous is gone.
  2 个评论
Ahmad Al-jelali
Ahmad Al-jelali 2016-9-6
Yah Walter that is 100% correct but because I am new to my Matlab your example was confusing me more because I couldn't get it to run. What I am doing is deplaning the aircraft one by one and seeing how the centre of gravity changes with respect to time. Each passenger weights 77 Kg and has 7 kg luggage with them. Can you please show me how to make the code and run it correctly.

请先登录,再进行评论。

更多回答(1 个)

Image Analyst
Image Analyst 2016-9-6
Try this for a start:
a=30;
b=3;
A=rand(a,b)<0.85;
B=zeros(30,1);
C=A;
D=[A B C]
[rows, columns] = size(D)
for row = 1 : rows
% Empty right side
D(row, 1:3) = 0;
% Compute center of gravity
% I'll let you do this. Let us know if you can't figure it out.
[xCOG(row), yCOG(row)] = FindCOG(D)
% Now empty left side.
D(row, 5:7) = 0;
% Compute center of gravity again.
[x(row), yCOG(row)] = FindCOG(D)
end
I assume you know how to find the center of gravity. It's not hard but let us know if you can't figure that out.
  15 个评论
Ahmad Al-jelali
Ahmad Al-jelali 2016-9-11
Yah he made it sound so easy when I asked. I will try my best to finish it but what is the best way to learn Matlab.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by