I've had task to do - to make an graphical interpretation of adding two functions together: sin(8x) and multiplied -sign(x) in Octave, as shown on image above. And I've done that, but I don't know how to get rid of these lines, which link up gaps between separated values (for example, -1 and 1). I don't want them to be seen especially in third graph.
To make helping me easier, I'm going to tell you what I did:
- I made linear series of numbers, from -100 to 99 (tempx).
- tempy = -sign(tempx)
- y1 = [tempy tempy tempy tempy] (this line is kinda funny, if you know Polish language)
- Creating y2 - sinus function
- y3 = y2 + y1
- Plotting, subplotting...
Awaiting for instructions...