The systolic and diastolic blood pressure readings are found

The systolic and diastolic blood pressure readings are found when the heart is pumping and the heart is at rest, respectively. A biomedical experiment is being conducted on only subjects whose blood pressure is optimal which is defined as a systolic blood pressure less than 120 and a diastolic blood pressure less than 80. Write a script that will prompt the user for systolic and diastolic blood pressures and print whether or not that person is a candidate for the experiment.

Solution

% matlab code to check if person is a candidate for experiment

systolic_BP = input(\"Enter systolic blood pressure: \");
diastolic_BP = input(\"Enter diastolic blood pressure: \");

if (systolic_BP < 120 && diastolic_BP < 80)
disp(\"Person is a candidate for the experiment\ \");
else
disp(\"Person is NOT a candidate for experiment\ \");
end

%{
output:

Enter systolic blood pressure: 110
Enter diastolic blood pressure: 70
Person is a candidate for the experiment

Enter systolic blood pressure: 130
Enter diastolic blood pressure: 100
Person is NOT a candidate for experiment

%}

 The systolic and diastolic blood pressure readings are found when the heart is pumping and the heart is at rest, respectively. A biomedical experiment is being

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site