Question about a problem

I have a textfile which I've already unpacked into a vector.
Each value (units: lbs) in the textfile is a minute of fuel consumption of a airplane's flight. So as an example, the 50th value (let's the value is 325 lbs) is the 50th minute value, and the plane's total consumption from beginning of takeoff to 50th minute is 325 lbs.
Now here is the question being asked.
I am asked to find how long the takeoff portion of the flight lasts. The following is the information I am given.
I am told to use the first half of the dataset.
FirstHalf = A(1:length(A)/2,:)
Next, I have found the average total consumption rate (simply took the last value in the text file/divided by total minutes). I am told the average total consumption rate is 1.5 times the average rate at takeoff. So simple maths gives us AvgTakeoff = AvgTotal/1.5. Now I have the average takeoff rate (in units of lbs/min), but I need to find out how long does the takeoff last (in minutes)? Can i do this using For Loops or If statements?

2 commentaires

Image Analyst
Image Analyst le 19 Oct 2018
This is inconsistent: "Each value (units: lbs) in the textfile is a minute of fuel consumption of a airplane's flight. So as an example, the 50th value (let's the value is 325 lbs) is the 50th minute value, and the plane's total consumption from beginning of takeoff to 50th minute is 325 lbs."
You said the value is the fuel consumption during that minute of flight. So the value at element 50 of 325 would mean that during minute #50, 325 lbs of fuel were used. But then you say that 325 means it was the "total consumption from beginning" of the flight. So, which is it? Consumption during only that minute, or total consumption since the flight started? You can't have it both ways.
FanOf23
FanOf23 le 19 Oct 2018
It's the total consumption since the flight started.

Connectez-vous pour commenter.

Réponses (2)

Walter Roberson
Walter Roberson le 18 Oct 2018
Modifié(e) : Walter Roberson le 18 Oct 2018

0 votes

size() will tell you how many entries are in FirstHalf, which in turn will tell you how many minutes it lasted.
Or is the question about looking through the data to find the point at which FirstHalf >= AvgTakeoff ?

2 commentaires

FanOf23
FanOf23 le 18 Oct 2018
Modifié(e) : FanOf23 le 18 Oct 2018
Your first response is exactly what I thought but I suppose it's not what is being asked.
I believe it is the second part. Here is the exact question:
The rate of fuel consumption is much higher when the aircraft is taking off and climbing
to cruising altitude. Assuming the fuel flow rate is at least 1.5 times the average rate
during takeoff and climb, how many minutes did the takeoff and climb phase of the flight
last? You will want to restrict this search to the first half of the dataset.
And we know the fuel flow rate and average takeoff rate.
Walter Roberson
Walter Roberson le 19 Oct 2018
diff() the total-fuel-used readings to figure out how much fuel was used in that minute. Find the first location where that is less than 1.5 times the average over the whole flight; that will be the minute at which the climb is already ended.

Connectez-vous pour commenter.

Image Analyst
Image Analyst le 19 Oct 2018

0 votes

Since part of the first half is take-off, you don't want to include that in the average fuel consumption. You want to take, like the average of the last 10% of first half, something like this

instantaneousFuelConsumption = diff(FirstHalf);
index = 0.9 * length(instantaneousFuelConsumption);
averageCruisingConsumption = mean(instantaneousFuelConsumption(index:end));

Now you need to find out which elements of instantaneousFuelConsumption are more than 1.5 times averageCruisingConsumption. Easy - give it a try.

2 commentaires

FanOf23
FanOf23 le 20 Oct 2018
Can this be done using 'if' statements or for loops?
Image Analyst
Image Analyst le 20 Oct 2018
Yes, it could be, if you didn't want to use find() like a typical MATLAB programmer would.

Connectez-vous pour commenter.

Question posée :

le 18 Oct 2018

Commenté :

le 20 Oct 2018

Community Treasure Hunt

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

Start Hunting!

Translated by