function x_new=my_kron(x)
% usage: if you have x=[1 2
%                        3 4];
% then this function will give your x_new as: x_new=[1 2 0 0
%                                                   0  0 3 4];
% make sure x should be column vector

[T,k]=size(x);
for i=1:T
    b{1,i}=x(i,:);
end
b=diag(b);

for i=1:T
    for j=i+1:T
        b{i,j}=zeros(1,k);
        b{j,i}=zeros(1,k);
    end
end

x_new=[];
for i=1:T
    c=[];
    for j=1:T
        c=[c,b{i,j}];  % stack columns together
    end
    x_new=[x_new;c];    % stack rows together
end
end