% basis of continuous piecewise
% linear functions
clear
figure(1); clf;
xgrid=[0;0.1;0.2;0.3;0.4;0.5;1.0];

p=7;I=eye(p);
t=0:0.02:1;
sig=interp1(xgrid,I,t);
for i=1:p
   plot(t,sig(:,i), 'linewidth', 1.0);
   hold on
end
xlabel('x')
ylabel('\sigma_i')

for i = 1:5
    text(0.05 + (i-1)*0.1, 0.9, sprintf('\\sigma_%1d',i+1) )
end
text(0.9, 0.9, '\sigma_7' )
text(0.015, 0.9, '\sigma_1' )

% fig=figure(1);
% print(fig,fullfile(pwd, 'Figure6_29.tif'),'-dtiff','-r600')
