Daniel@0: function y = hwr(x) Daniel@0: % Half-Wave Rectifier Daniel@0: Daniel@0: y = 0.5 * (x + abs(x));