Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use MATLAB coding ou have just developed a new glucose sensor for people to monitor their blood sugar and test for diabetes. The definitions of

Use MATLAB coding

image text in transcribed

ou have just developed a new glucose sensor for people to monitor their blood sugar and test for diabetes. The definitions of "normal", "impaired glucose tolerance" (also called prediabetes) and "diabetic" depend not only on the blood sugar reading, but how soon it was taken after a meal, as given in the table below. (Note, do not use this table to make a medical diagnosis) Glucose level (mg/dL) Fasting Normal Impaired Glucose Tolerance, or "prediabetes" Diabetic 80-100 101-125 After Eatin 170-200 201-230 2-3 hours after Eating 120-140 140-200 126+ 231+ You want to create a function to let the user know what category their blood sugar falls into. The inputs to the function should be glucose level and time after fasting, and the output of the function should be either "Normal", "Prediabetes", "Diabetic", or "Glucose Not in Range". (Some of you ran into this problem when testing your program last time) First, test this function on some known value:s Now make a script file which calls the new function multiple times. Your script file should include two arrays (of the same length) Glucose-(90 120 140 160 180 210 240 110 130 150 220]. % glucose level mg/dL LastFood= [200 200 200 10 10 10 10 150 150 150 1501; % time after eating (min) Your script file should have a loop. Each time through the loop, send one value of glucose and the corresponding time of last food to the function and get the results

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions