x = linspace(0,2*pi);
y1 = sin(x);
y2 = abs(sin(2*x))/2;
plot(x,y1,x,y2)
set(gca,'ylim',[0 1]);
set(gca,'ytick',0:0.1:1);
But you're going to cut off your y1 because that assumes values less than 0.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!