Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Questions: 1) (8 points) A Soccer league wishes to process the results of its top four teams. Those results are currently stored in the following

image text in transcribedimage text in transcribed

Questions: 1) (8 points) A Soccer league wishes to process the results of its top four teams. Those results are currently stored in the following matrix: 6 2 4 10 9 0 0 9 1 2 10 500 8 1 3 15 3 0 0 7 3 2 9 2 0 0 The meaning of the columns is as follows: Column Description Games Won Games Tied Games Lost Goals Scored Goals Received Goals Difference (to be calculated) Total Points to be calculated) The number of points awarded per game (3 points per win, 1 point per tie, 0 points per loss) is contained in the following vector: 3 1 0 Create a MATLAB script to process the matrix information to do the following: Calculate the Goals Difference (Goals Scored - Goals Received) and record the results on the 6th column. Calculate the Total Points obtained (based the data on the first 3 columns and the vector with the points awarded per game) and record it on the 7th column. Then, perform the appropriate matrix and/or vector operations to be able to display the information required by the next steps (Tip: consider the use of the find function). Display the row position that contains the team with the most Total Points (row index for the team with most total points). Display the row position that contains the team with the least Total Points (row index for the team with least total points). Display the row position that contains the team with the best Goal Difference (row index for the team with highest goal difference). Display the row position that contains the team with the worst Goal Difference (row index for the team with lowest goal difference). Notes: Use matrix and/or vector operations when processing the information. Although the matrix contains only 4 teams, the solution should work the same should the matrix contain more rows. Although the Goals Difference and Total Points occupy column positions 6th and 7th, assume that those column indices might change if more data (columns) are added at some point. Use the appropriate functions to estimate the positions of the last and next to last columns. [Tip: Use length or size to gather that information)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions