%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    
%    
function check_for_nans (aVariable, aVariableName)

if any(isnan(aVariable))
    fprintf(['!!! Found NaN in ''' aVariableName ''', please check !!!\n']);
    keyboard
end

return
