x = linspace(0,1,200); phi = 3*x.^2 - 2*x.^3; psi = x.^3 - x.^2; subplot(1,2,1); plot(x,[phi;psi]); makelarge legend(['phi'; 'psi']); x0 = 1; x1 = 1.5; h1 = x1-x0; x = linspace(x0,x1,200); xs = (x1 - x)/h1; b1 = 3*xs.^2 - 2*xs.^3; b3 = -h1*( xs.^3 - xs.^2 ); xs = (x - x0)/h1; b2 = 3*xs.^2 - 2*xs.^3; b4 = h1*( xs.^3 - xs.^2 ); subplot(1,2,2); plot(xs,[b1;b2;b3;b4]); makelarge legend(['b1'; 'b2'; 'b3'; 'b4']);