%CreateBk.m %Math 128B Spring 2005 %Returns B1(i,j)=Bjk(Xi) % =j'th B-spline (k > 1) evaluated at Xi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Functions called: %BSpline, CreateOmega %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [X, B1] = CreateBk(knots, k, h) %X = knots(1):h:knots(end); N = length(knots); X = []; for j=2:N X = [X knots(j-1):h:knots(j)]; end %create B1 whose (i,j) entry is Bj,1(Xi) B1 = BSpline(X, knots); for K=2:k B = B1; %create Omega and then B2 whose (i,j) entry is Bj,k(Xi) w = CreateOmega(X, knots, K); B1 = B(:,1:end-1) .* w(:,1:end-1) + B(:,2:end) .* (1 - w(:,2:end)); end return