Class Act 2
• For a biomedical experiment, the first name, the last name, and
weights of some patients have been stored in a file 'patient_rec.dat'.
• The file may look like this:
Grey Chris 166.2
Hall David 143.5
Giovanni Luke 192.4
Cat Donna 215.1
• First Create this data file and add 4 lines of data. Then, write a script
\texttt{read\_patient.m} that will attempt to open the file. If the file open
is not successful, an error message is printed, otherwise, the script
will read the data into a cell array, prints for each person the name
in the form 'first, last' followed by the weight. The script also
calculates and prints the average weight and whether the file close
was successful.