Hello and sorry if my question might sound hard to understand at first!
Me and some coursemates went flying on a uni simulator which gave us different parameters under the form of arrays ( for example, altitude, time etc)
We had to create a program that takes those parameters, plots them into graphs and determines who was the best pilot.
I thought about using a scoring system similar to the ones in games, where at the end of each evaluation the data will be sorted in a hierarchical way.
For example taking the Altitude/Time graph, I had to determine the area underneath that graph, which I found out using the trapz function, afterwards I sorted ascending all that data, and the pilot with the smallest area is declared the winner of that round. All fun and games until here... -ish.
We were 6 pilots, therefore place 1 received 5 points, place 2 received 4 points etc place 6 received 0 points. I want that each pilot to receive a variable ( For example, lets call a pilot John) that is equal to 0 at the beginning. If john won 3rd place, he has to receive therefore 3 points. I dont know how to create this, as all I did was just compute that area and sort it. I dont know how to assign each pilot that area and how to give him those points.
Here is some of my coding:
title('Altitude variation over time');
Help would be much appreciated!