The image shows a sine wave is obtained using MATLAB. I would like to know what they possibly multiplied or what expression could one use in MATLABto get this wave instead of a complete sine wave.
The matlab way, using logical indexing:
t = -4*pi:.01:4*pi; a = sin(t); a(a <= 0) = 0; plot(a)
I don't know MatLab but I suspect that (y + |y|)/2 (where |y| is the absolute value of the function) would do the trick.
When the function is positive the two halves add to give a regular sine. When the function is negative the function and absolute value cancel out.