Setting negative values in wave to zero

Hi all,

I have wave with (512,512) points. It consists of positive and negative values. How can I set all negative values in the wave to zero and preserve all positive values?

If execution time is important, you might want to consider

MatrixOP/O mywave = mywave * replace(sgn(mywave), -1, 0)

which takes about 60% of the time for a (512,512) wave.