added check_sample_nans.m to samples/