Predicting Mortality of ICU Patients: The PhysioNet/Computing in Cardiology Challenge 2012 1.0.0

File: <base>/sources/mmacas_at_seznam.cz/entry9/f_trend.m (223 bytes)
function y = f_trend(name,record)

%return slope of a line 

[time_series,values]=getTimeSeries(name, record);

if length(values) > 1
    p=polyfit(time_series,values,1);
    y = p(1);
else
    y = NaN;

end