Adding zero values to array

Dear All,

I have created an array (and associated image plot) which contains a function with a square root anomaly. I need to convolute either slices at fixed x values or (preferable) the whole array with a Gaussian in y. However, there are no values (or Nan values?) in the array outside the square route anomaly.

Obviously if I add zero values manually to the wave(s) I can make the convolution work. Is there a neat way to add these to the whole array? Also what would be the command for convoluting the whole array with a Gaussian in y?

cheers, (hope that makes sense!)

Jim


if w is your array and if it contains NaN's then you could use

w= SelectNumber(numtype(w[p][q])==2,w[p][q],0)


to fill in zeros.
Quote:

w= SelectNumber(numtype(w[p][q])==2,w[p][q],0)



This is equivalent to:
w= SelectNumber(numtype(w)==2,w,0)


Without indexing, 'w' on the righthand side means "the value of the point in the destination wave that is currently-being evaluated".