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

function [ s1, f ] = nanequal( x1,x2 )
%UNTITLED Fraction of x1 and x2 that are equal including NaNs
%   Detailed explanation goes here

xnan = isnan(x1) & isnan(x2);

s1 = sum(xnan) + sum(x1==x2);

f = s1==numel(x1);

end