In: Electrical Engineering
Matlab
The following matrix describes Injury Severity Score (ISS, unitless) and hospital stay (days). Row 1 is the ISS and row 2 is the hospital stay.
[64,35,50,46,59,41,27,39,66;
8,2,5,5,4,3,1,4,6].
Create a script that plots stay in hospital vs ISS. Label the plot and all axis. Display to the command window a message with the mean ISS score, and the mean days in hospital. (i.e. “The mean ISS score is 30”, not just x = 30).
Use the sort(x) to arrange a vector in ascending order
Question: On the plot select “Tools” -> “Basic Fitting”. A window will pop up for line fitting. Select the box “linear”. Press the right arrow button to get the coefficient values for linear fit. What is the estimated stay for a patient with a ISS of 55?
Make note of the formula as it will be used later.
Calculating ISS for an individual involves taking scores from an Abbreviated Injury Scale (AIS) from 0 – 5 for six different body areas head, face, chest, abdomen, extremities, and external. The three body areas with the highest score have their AIS squared and are added together to produce an ISS for individual.
Matlab Code :
A = [64,35,50,46,59,41,27,39,66;
8,2,5,5,4,3,1,4,6];
% Row 1: Injury Severity Score (ISS, unitless)
% Row 2: Hospital stay (days)
x = A(2,:);
y = A(1,:);
plot(x,y)
grid on
title 'Plot of Injury Severity Score (ISS, unitless) v/s Hospital
stay (days)'
xlabel 'Hospital stay (days)'
ylabel 'Injury Severity Score (ISS, unitless)'
sprintf('The mean ISS score is %2.2f ”',mean(A(1,:)))
sprintf('The mean no of stay day is %2.2f ”',mean(A(2,:)))
y_sorted = sort(y)
x_sorted = sort(x)
--------------------------
Command Window:
ans =
The mean ISS score is 47.44 ”
ans =
The mean no of stay day is 4.22 ”
y_sorted =
27 35 39 41 46 50 59 64 66
x_sorted =
1 2 3 4 4 5 5 6 8
>>
-----------------------------------------------------
-----------------------------------
from the linear fit the equation will be :
y = p1*x + p2
Coefficients:
p1 = 5.5438
p2 = 24.037
Norm of residuals =
18.801
If we put y = 55 we will get no of days of stay by solving above lienar equation
so no of days = 5.58 days = 6 Days