x = 0:0.1:10;
y = sin(x);
y2 = 2*sin(x);
hold on
g = area(x,y2);
h = area(x,y);
set(h,'FaceColor','r');
set(g,'FaceColor','g');
hold off