clc
clear
x1=0:0.01:5;
f1=3*ones(size(x1));
x2=5:0.01:10;
f2=0*ones(size(x2));
x3=10:0.01:15;
f3=3*ones(size(x3));
f=[f1 f2 f3];
x=[x1 x2 x3]
plot(x,f), xlabel('x'),ylabel('y')
To embed this project on your website, copy the following code and paste it into your website's HTML: