It looks like your data is corrupted, possibly with some NaNs.
You could plot a scatterplot of your input /output matrix [X Y]
using Matlab plotmatrix
command (use a Monte Carlo sample to do this, or your data if you pre-computed it) and see if there is nothing obviously wrong.
Best regards