function [Splines Combinations ] = Make_splines(dim_seq, alpha_seq, M_seq, Lb_seq, Ub_seq)
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here


Anzahl=length(dim_seq);

%Anzahl_Splines_seq=zeros(Anzahl,1);

Splines=cell(Anzahl,1);
Combinations=cell(Anzahl,1);

for i=1:Anzahl
   
    Anzahl_knotseq=ceil((Ub_seq(i)-Lb_seq(i))/alpha_seq(i))+(M_seq(i)-1)+1;
    
    %dim=k_seq(i)+1;
    
    knots=repmat(Lb_seq(i)-M_seq(i)*alpha_seq(i):alpha_seq(i):Lb_seq(i)+alpha_seq(i),Anzahl_knotseq,1)+(0:(Anzahl_knotseq-1))'.*alpha_seq(i)*ones(1,M_seq(i)+2);

    Combinations{i}=combinator(int8(Anzahl_knotseq),dim_seq(i),'p','r');

    %Anzahl_Splines_seq(i)=size(Combinations{i},1);
    
    Spline=cell(Anzahl_knotseq,1);
    
    for k=1:Anzahl_knotseq

            Spline{k}=spmak(knots(k,:)',1);
   
    end
    
    Splines{i}=Spline;
    
      
end
    
    
    
end

