Question
please help me finish this lab in MATLAB In this lab, you will build on your scripting experience and create a script that classifies patients
please help me finish this lab in MATLAB
In this lab, you will build on your scripting experience and create a script that classifies patients into various clinical categories based on BMI and blood pressure using conditional statements. All patient data are to be read in from text files which are provided with this handout.
- Read in the patient data and save them into individual arrays. The patient data provided are age, height in cm, weight in kg, diastolic blood pressure and systolic blood pressure.
- Calculate the BMI of the patients and sort them into the categories as described in Figure 1. You can adapt your script from the previous lab.
- Using the blood pressure data, sort the patients into the various blood pressure categories (low, normal, pre-hypertension, stage 1 hypertension and stage 2 hypertension) as shown in Figure 2.
- Calculate the mean arterial pressure (MAP) using the formula given below for all patients
- Create a plot of patient age vs MAP. Comment on any trends that you may see.
- Save the workspace.
In the 1-page results report, provide the following:
- Patients in each BMI category. This includes the number of patients in each category, including patient IDs.
- Patients in each blood pressure category. This includes the number of patients in each category, including patient IDs.
((this is what i did so far)):
weight = dlmread('weight_kg.txt','\t');
age = dlmread('age.txt','\t');
height = dlmread('height_cm.txt','\t');
diastolic = dlmread('diastolic_bp.txt','\t');
systolic = dlmread('systolic_bp.txt','\t');
height_m = height/100
BMI = weight./(height_m.^2);
disp(BMI)
if(BMI
fprintf('Underweight');
elseif ((18.5
fprintf('optimal');
elseif((25
fprintf('overweight');
elseif(BMI>30)
fprintf('obese');
end
(( I couldn't uploud the files just help me writing the codes please i can run it myself at least give me a hint of the codes ))
thanks in advance!!
190+- 180 HIGH: STAGE 2 HYPERTENSION 170 - 160 150 - HIGH: STAGE 1 HYPERTENSION BMI Classification 140 - SYSTOLIC BLOOD PRESSURE BMI Category 130 - PRE HYPERTENSION 120 - Lower than 18.5 Underweight 110 - NORMAL 100 - 18.5 up to 25 Optimal 90 25 up to 30 Overweight 80 - LOW** 30 upwards Obese 702 1 40 50 60 70 80 90 100 110 120 DIASTOLIC BLOOD PRESSUREStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started