Biostatistics Lab 2 Part 2
Biostatistics Lab 2 Part 2
Lab 2, Part 2
MATLAB data input/output
Thursday, 17th August 2023, 11:30 am to 12:50 pm
Instructions: Download all data files from the Google Classroom and upload into a MATLAB folder named
“Biostatistics Lab 2”. Copy and paste your code, graphs/plots, and answers to the problems into a word processor
(either Microsoft Word or Google Docs) and convert the file to a PDF. Label the axes in your graphs appropriately
(with readable font size), and provide a title for each graph. Include the appropriate measurement units with your
quantitative answers and axes labels. Add comments to each line of code when necessary. Submit your answer
sheet PDF with both Problems 1 and 2, and the *.tif and *.txt files in the Google Classroom by the end of lab on
Thursday, 17th August 2023.
Problem 2: The text file “hospitaldata.txt” contains information about 99 patients who visited the hospital for their
annual physical exam. Create a MATLAB script to perform the following tasks:
(a) Load the text file data into the MATLAB workspace. The sixth column of the patient data correspond to
their systolic blood pressures.
(b) Compute the number and percentage of patients who have normal systolic blood pressures (less than
120 mmHg), who are at risk for hypertension (120 to 139 mmHg), and who have hypertension (at least
140 mmHg), according to the U.S. Center for Disease Control guidelines (link). (Hint: You can review the
relational and logical operators in MATLAB (link to Help Center). The sum function may be useful.) Round
the percentages to the nearest tenth (X.X). Create a table of your results in the following format: