Question: Using MATLAB Create a vector of structs to represent a database in which a professor might store information pertaining to his/her students. Every element in
Create a vector of structs to represent a database in which a professor might store information pertaining to his/her students. Every element in the vector represents information about one particular student. For every student the professor wants to store: - Name (a string) - University ID (Number) - Quiz scores (a vector of five quiz scores) The vector variable, which you should call student, might look like the following: Each element in the vector is a struct with three fields (name, id_no, quiz scores). For example the third element of the above data structure could be defined as follows: >>student (3) = struct('Name', 'Tony, Romo', 'id No', 332, 'Quiz Scores', [75 60 85 90 72]); Create a structure with at least 5 students (add two or more students to the above list of students). The professor would like to print the quiz average for each student. To accomplish this create a function printAverage() that would take as input the student structure, calculate the averages, and print the results as follows: >>printAverage (student) Submit the codes and the resulting output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
