Question: IN MATLAB A company is testing a portable device that monitors heart rate. For this, the company would like to create a software that analyzes
IN MATLAB
A company is testing a portable device that monitors heart rate. For this, the company would like to create a software that analyzes the heart rate and alerts the user if a sudden change occurs in the heart rate. Use the file heart.txt which contains sample heart rate data acquired once per minute from a patient who was wearing the device. A sudden change is defined as a heart rate that is more than 20% different (larger or smaller) than the average of the previous five heart rate values. Thus, you would need to check for sudden changes from the 6th data point onward. If the program identifies a sudden change, it should display a warning like this with the time the anomaly was detected (if there is an increase): WARNING - Abnormal increase in heart rate at minute 65 The program should display if there was a sudden increase or decrease in the heart rate. All sudden changes should be reported. If there are no sudden changes, the program should display: No abnormal changes detected Your program should include a script that has (i) a function call to obtain the data from the text file and (ii) a separate function call that analyzes the data and creates a new array or variables to store any information about abnormal increases or decreases, and (iii) a separate function to display any warnings and write all the warnings to a text file along with the time the warning was detected. There should not be anything printed to the command window or file from the 2nd analysis function. A company is testing a portable device that monitors heart rate. For this, the company would like to create a software that analyzes the heart rate and alerts the user if a sudden change occurs in the heart rate. Use the file heart.txt which contains sample heart rate data acquired once per minute from a patient who was wearing the device. A sudden change is defined as a heart rate that is more than 20% different (larger or smaller) than the average of the previous five heart rate values. Thus, you would need to check for sudden changes from the 6th data point onward. If the program identifies a sudden change, it should display a warning like this with the time the anomaly was detected (if there is an increase): WARNING - Abnormal increase in heart rate at minute 65 The program should display if there was a sudden increase or decrease in the heart rate. All sudden changes should be reported. If there are no sudden changes, the program should display: No abnormal changes detected Your program should include a script that has (i) a function call to obtain the data from the text file and (ii) a separate function call that analyzes the data and creates a new array or variables to store any information about abnormal increases or decreases, and (iii) a separate function to display any warnings and write all the warnings to a text file along with the time the warning was detected. There should not be anything printed to the command window or file from the 2nd analysis function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
