clc 
clear 
disp "courtni k."
x1=-6:0.01:-2;
y1=-3*ones(size(x1));

x2=-2:0.1:3;
y2=2*ones(size(x2));

x3=3:0.01:7;
y3=5*ones(size(x3));

plot(x1,y1,'b',x2,y2,'b',x3,y3,'b');title('g(x)');xlabel('x');ylabel('g(x)');grid on

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: