I understand you want to decimate signals that contain NaN.
I assume you would like to decimate a signal by a factor r if it contains NaN values.
I have removed the NaN values from the signal and then decimate it as follows.
x is assumed as the signal.
positionNaN = isnan(x);
x(positionNaN) = ;
y = decimate(x,r) ;
Here positionNaN is a logical array of the same size as x containing 1 whenever a NaN value is present otherwise zero.