I was just wondering if there is a way to change a particular part of a plot to another color? Suppose we have a plotted signal in BLUE and we wannan show the main response (let's say with the highest amplitude) in RED.
Prashant Kumar answered .
2025-11-20
You can draw different lines.
t = 0: 0.02: 4 * pi; y = sin (t); index = (y >= 0); plot(t, y, 'b'); plot(t(index), y(index), 'r');