Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve using Matlab, the screenshot of the .xlsx file is attatched below please copy it onto a spreadsheet to then upload it into Matlab as

Solve using Matlab, the screenshot of the .xlsx file is attatched below please copy it onto a spreadsheet to then upload it into Matlab as an .xlsx file. Show steps and screenshots please image text in transcribed
image text in transcribed
1. Student Grades Write a MATLAB script that processes marks stored in an Excel file. The program reads the name of an Excel spreadsheet file as input, and produces as output the name of each student and his or her overall marks. A sample Excel file (called ClassGrades.xls) containing the names of the students and their grades on tests, quizzes, and homework assignments is provided to you. You have to write a program to calculate the overall marks received by each student as follows: The combined test average should account for 40% of the final grade. The combined quiz average should account for 25% of the final grade. The combined homework average should account for 35% of the final grade Each test is worth 100 points, quizzes are worth 10 points each, and each homework assignment is worth 20 points. Note that your program must not make any assumptions regarding the number of students in the class, and must work correctly even when an input file with a different class size is supplied. The first row in the file ClassGrades.xlsx contains the following columns: Name Test/ Test2 Test3 Quizl Quiz2 Quiz3 Quiz4 Quiz5 Homeworkl ... Homework2 Homework3 Homework 4 Homework5 Output Format: Your function must display the student name followed by the overall marks for each student. The marks should display with exactly one digit to the right of the decimal point. For example, Student Name Steven Ketchum Flora Nicol Carlos Reichard Overall marks 69.6 82.2 68.2 Solve this problem as follows: a) Use two separate arrays (one for the strings and one for the numbers) after loading the file using xlsread to create the result shown above. b) Then, to gain some familiarity with cell-arrays, load the file using readcell. Now the data exists as a cell array, and you should be able to strip off the names only into a new cell array (names) and the data into a separate cell array (scores). Be sure that you see the difference between and for a cell e.g. names(1) and names(1), or scores(2,2) and scores (2,2}. c) Finally, create a structure array (grade_arr) with two fields consisting of the names and the scores to store the data. Use the dot notation to show that you can access any desired elements, grade_arr(1),names, grade_arr.names(1), grade_arr.names), grade_arr.scores(5:10), grade_arr.scores (5:10), etc.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

What are factors of productions

Answered: 1 week ago