Modifying cnn_convolve.m for 1D.