x=-10:0.1:1;
y=x;
plot(x,y,'-g');
x=1:0.1:4;
y=x.^2;
hold on
plot(x,y,'-r');
x=4:0.1:10;
y=2.^x;
plot(x,y,'-b');
grid on
hold off
x=-10:0.1:1;
y=x;
plot(x,y,'-g');
x=1:0.1:4;
y=x.^2;
hold on
plot(x,y,'-r');
x=4:0.1:10;
y=2.^x;
plot(x,y,'-b');
grid on
hold off