I think i solve the problem. Here is the code if you are interested;
num=length(t);
k=zeros(1,num);
f1=0.8;
f2=1;
f3=0.5;
fs=100;
T=1/fs;
for i=1:num;
if i<=num/5;
k(i)=2*sin(2*pi*f1*t(i));
else if i<=2*num/5;
k(i)=0;
else if i<=3*num/5;
k(i)=sin(2*pi*f2*t(i));
else if i<=4*num/5;
k(i)=0;
else i<=num;
k(i)=3*sin(2*pi*f3*t(i));
end
end
end
end
end
plot(t,k)