Question: MATLAB Problem 3: Building a Cell Array with Iterration Write a function [studentCe11] =classCe11ArrayLab3(studentNames, student!Ds, studentGrades) that accepts a m x n char array of
MATLAB
Problem 3: Building a Cell Array with Iterration Write a function [studentCe11] =classCe11ArrayLab3(studentNames, student!Ds, studentGrades) that accepts a m x n char array of names (studentNames), amx 6 char array of student IDs (studentIDs), and a m x O double array of grades (studentGrades). The function should return a m x 4 cell array (studentCell) with the data in studentNames occupying the all rows of the first column of the cell array studentCell, the data in studentIDs occupying the all rows of the second column of the cell array studentCell, the data in studentGrades occupying the all rows of the third column of the cell array studentCell, and the fourth column containing the mean of the three grades for each student. i.e. studentCell (1,4 ) contains the mean of the data in studentGrades (1 , ) ; studentCell (2,4) contains the mean of the data in studentGrades (2,:) ;etc. A table with sample data is provided below, but the function should work for ANY variable inputs that follow the general format specified above. Be sure to verify that your function can handle the same inputs and produce the same outputs as the test cases below. Check both the class and size! HINT! USE A FOR LOOP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
