2;4;170;25 3;2;210;40 4;3;200;33. This is using MATLAB. Code 2: Using the import
ID: 3737622 • Letter: 2
Question
2;4;170;25 3;2;210;40 4;3;200;33. This is using MATLAB. Code 2: Using the import tool, import the cardiac resynchronization therapy (CRT) data. The data is used to calculate if a patient is eligible for CRT treatment and organized as follows: . Column 1-Patient ID . Column 2-NYHA class (New York Health Association symptom severity) Column 3-6MWD (6 minute walk distance in meters) Column 4- EF (left ventricular ejection fraction in percent) . If the following are all TRUE, then a patient is eligible for CRT treatment NYHA is 3 or higher 6MWD is less than 225 meters EF is less than 35% . Write a script to check what patient IDs in the data are eligible for CRT. Write the patient IDs that are eligible to a text file that is titled CRTApprove and delimited with a semicolon Note: Your script should be robust so that if a larger or smaller data set was used, it still works. Avoid hard coding indexes. |Explanation / Answer
SAVE THE FOLLOWING CODE IN MATLAB AND RUN THE PROGRAM TO GET THE RESULTS-
clc
clear
close all;
CRT_DATA=[1 2 3 4;3 4 2 3;250 170 210 200;30 25 40 33];
patient_id=CRT_DATA(1,:);% patient id
NYHA_Class=CRT_DATA(2,:);% New york health association symptom
MWD_6=CRT_DATA(3,:);% 6 min walk distance in meter
EF=CRT_DATA(4,:);% Ejection fraction
if isa(patient_id,'double') && isa(NYHA_Class,'double') &&...
isa(MWD_6,'double') && isa(EF,'double')
disp('Patient is Eligible for CRT Treatment')
else
error('Patient is not eligible for CRT Treatment')
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.