Question
MATLAB HELP!! NOT C++ MATLAB has multiple built-in datasets that could be used for data processing and analysis. One of those datasets is hospital.mat which
MATLAB HELP!! NOT C++
MATLAB has multiple built-in datasets that could be used for data processing and analysis. One of those datasets is hospital.mat which contains simulated hospital data. Run the following snippet code to load the data and get enveloping information about the fields in the data.
load hospital
summary(hospital)
Your goals in this problem are to write MATLAB codes to:
1. Obtain the number of male patients and the number of female patients in the dataset. Compare your results to the ones obtained when you run summary(hospital).
2. Obtain the number of smokers and non-smokers in the dataset. Again compare your results to the ones obtained when you run summary(hospital).
3. Compute the average age of the female patients and the average age of the male patients.
4. Compute the average weight of the female patients and the average weight of the male patients.
5. Compute the average weight for the female patients that are smoker and have an age below 45.
6. Compute for each patient the mean of the number of trials and add the results to the table with a column header of Mean_Trials. For the patients that have missing number of trials, replace the NaN values with 0.
7. A blood pressure less than 120/80 mmHg is normal. A blood pressure of 140/90 mmHg or more is too high. People with levels in between 120/80 and 140/90 have a condition called prehypertension, which means they are at high risk for high blood pressure. Given this information, how many patients in the provided data have a normal blood pressure, a too high blood pressure, or have the prehypertension condition?
8. Compute the average blood pressure for the smoker and nonsmoker patients. Which group is the healthiest? Justify your answer.
Step 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