Question: Write a function bpcategory _ struct ( patients ) that takes in a structure array containing systolic and diastolic blood pressures of patient and returns

Write a function bpcategory_struct( patients) that takes in a structure array containing systolic and diastolic blood pressures of patient and returns the blood pressure categories as cell array of texts, according to the following chart. You can freely decide the category when a blood pressure value falls on a boundary (e.g., if sys=90 and dia=50, both 'low' and 'normal' are acceptable).
>> cat = bpcategory_struct([struct('systolic',85, 'diastolic',50), struct('systolic',100, 'diastolic',80)])
Include bpcategory low, normal, high
cat=struct('systolic',{85,100,75}, 'diastolic',{50,80,100})

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!