function out1 = getIF3( bsavex,k )
%beta
N=size(bsavex,2);
NN=(N*(N-1))/2;
bsave=zeros(size(bsavex,1),NN);
for j=1:size(bsavex,1)
    tmp=squeeze(bsavex(j,:,:));
    tmp=vec(tril(tmp,-1));
tmp=tmp(tmp~=0 & tmp~=1);
% %     tmp
%     size(tmp)
%     NN
    bsave(j,:)=tmp';
end
out1=[];
for i=1:size(bsave,2)
    
    b=bsave(:,i);
    
    tmp=mcmc_ifac(squeeze(b),k);
    out1=[out1;tmp];
end
    

end

