Reference no: EM132397066
MATLAB GUI (GRAPHICAL USER INTERFACE) TASK -
Arterial resistivity index (ARI) is a measure of pulsatile blood flow that indicates the resistance to blood flow through an artery. ARI is calculated with the following formula.
ARI = (vsystole - vdiastole)/vsystole
vsystole is the velocity during contraction and vdiastole is the velocity during relaxation. The velocity is measured using Doppler ultrasound and one data point is recorded every 3 ms. A Doppler recording is saved in the excel file PatientDoppler.xlsx.
Write a script that does the following:
1. Plot Velocity (cm/s) 'vs' time (ms) with appropriate plot title, x-label, and y-label.
2. Calculate ARI and display to command window. Please put a text indication of what is being displayed.
Note: vsystole is the maximum velocity in the dataset. vdiastole is the minimum velocity in the dataset.
3. Calculate the instantaneous heart rate from Doppler data as beats per minute and display to the command window. Please put a text indication of what is being displayed.
Note: Use the peaks to calculate heartrate.
HR = 60/(T2 - T1) where T2 and T1 are the points in time where where the maximum peaks occur.
4. Write the ARI and instantaneous heart rate values to a delimited text file called DopplerResults. The delimiter for the text file is a semicolon.
The code should be robust and handle data files of various sizes. Script will be graded for this functionality.
Bonus: If Code 1 is implemented in a GUI, you will get + 10 points added to the grade. GUI must work 100%. There are no partial bonus points. The following is required for the GUI.
ARI and heart rate are displayed to text boxes.
Data is not loaded until a load button is pressed. The GUI uses the file GUIData.txt. It contains two additional columns for a patient name and ID. The name and ID are displayed to two separate text boxes.
Note: The patient first and last name are in the same text box separated by a space. Not a period as seen in the text file.
The plot of the doppler data is on the GUI and displayed as a red solid line with appropriate title and axis labels.
The type of file to output ARI and instantaneous heart rate can be selected from a drop-down menu. The file can be saved as a csv file, or the delimited text file.
The output file is not saved until a save button is pressed.
GUI must be organized in its layout.