0% found this document useful (0 votes)
36 views1 page

Biostatistics Lab 2 Part 2

Uploaded by

sourabh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views1 page

Biostatistics Lab 2 Part 2

Uploaded by

sourabh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BE 614 Biostatistics, 2023-24 Sem I

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.

Learning Objectives: Students will learn the following:


1) How to read other file formats and load their data into the Workspace.
2) How to create and save script files (*.m files) and export figure files in various formats.
3) How to write data into a text file.
4) How to comment the code properly.

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:

Normal Pre-hypertension Hypertension


Number of X X X
patients
Percentage of X.X X.X X.X
patients (%)

(c) Write your results into a comma-delimited text (*.txt) file.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy