(Solved) : Returning Array Element Array Strings String Array Classroster Row Array String Scalars St Q44105571 . . .

Returning an array element in an array of strings The string array classRoster is a row array of string scalars with the student names. The array entry corresponds to the seat number of the student. Write a function that returns the name of the student in the seat given the string array classRoster and the seat number. Ex: classRoster=[“Jill Applegate”; “John Monroe”; “Cristian Phillips”]; studentName = Student Lookup (classRoster, 2) returns studentName = “John Monroe” Function Save C Reset MATLAB Documentation 1 function studentName = StudentLookup (classRoster, seatposition) studentName = ‘FIXME’; 3 end Code to call your function C Reset StudentLookup ([“Megan”; “Greg”; “Jacob”; “Tony”], 3) Show transcribed image text Returning an array element in an array of strings The string array classRoster is a row array of string scalars with the student names. The array entry corresponds to the seat number of the student. Write a function that returns the name of the student in the seat given the string array classRoster and the seat number. Ex: classRoster=[“Jill Applegate”; “John Monroe”; “Cristian Phillips”]; studentName = Student Lookup (classRoster, 2) returns studentName = “John Monroe” Function Save C Reset MATLAB Documentation 1 function studentName = StudentLookup (classRoster, seatposition) studentName = ‘FIXME’; 3 end Code to call your function C Reset StudentLookup ([“Megan”; “Greg”; “Jacob”; “Tony”], 3)
Expert Answer
Answer to Returning an array element in an array of strings The string array classRoster is a row array of string scalars with the…
OR