clear  
close
ix =[0 0.80 1.24 1.45 1.83 2.76];
pc = [0 0.2 0.4 0.6 0.8 1.0];
t = linspace(0,max(ix)+1,200);
yt= interp1(ix,pc,t,'linear');
figure(1)
plot(t,yt,ix,pc,'*')
r = rand(200,1);
x = interp1(pc,ix,r,'linear');
figure(2)
hist(x)