Please solve by using matlab codes. In the following table there are homework, p
ID: 3602254 • Letter: P
Question
Please solve by using matlab codes.
In the following table there are homework, project, midterm and final grades of students who are taking a mathematics course. In this problem we will calculate their final grades and store all of the information below. Do the following operations below for the given database HW Ainshley87 Baker Eadric Jacey Sebastian 32 Project MD FINAL GRADE 69 95 56 84 83 54 72 24 89 71 68 62 43 97 54 Homework | 10% Project Midterm | 30% Final Total 74 58 10% 50% 100% a. Define a structure array whose each field belongs to one student. b. Define a matrix, say "allgrades" and get all numeric values from your structure array c. Update your "allgrades" matrix by adding a new column which includes overall grade d. Update the structure array by adding overall grades of each student into the related e. Define a cel array whose first cell determines homework grades of each student with In your "allgrades" array, each row should belong to grades of each student. of each student. Round values as well fields. their names, and similarly second cell determines project grades, third cell determines midterm grades, fourth cell determines final grades and fifth cell determines overall grades. (Hint: Use a character array with num2str function which includes names of each student. Use the "allgrades" matrix to get numeric values.) f. Convert your cell array into a 3D arrayExplanation / Answer
all=[87 69 54 72 0;74 95 24 89 0;58 56 71 68 0;49 84 62 43 0;32 83 97 54 0]
all(1,5)=0.1*all(1,1)+0.1*all(1,2)+0.3*all(1,3)+0.5*all(1,5)
for i=1:5
all(i,5)=0.1*all(i,1)+0.1*all(i,2)+0.3*all(i,3)+0.5*all(i,5)
end
all