%
%   version 1.3.02
%
%
function Bpr = cal_Bt(s_B,daefile,y,x,t,varargin)
tresh(1)=1.0;  %1e-10;
if s_B
    z0=feval('cal_B_column_exact',0,t,daefile,y,x,varargin{:});
    [z,fac,g1,nF]=numjac('cal_B_column_exact',0,t,z0,tresh,[],0,[],[],daefile,...
        y,x,varargin{:});
else
    z0=feval('cal_B_column',0,t,daefile,y,x,varargin{:});
    [z,fac,g1,nF]=numjac('cal_B_column',0,t,z0,tresh,[],0,[],[],daefile,...
        y,x,varargin{:});
end;
n=length(x);
Bpr=sparse(n,n);
for i=0:n-1;
    Bpr(:,i+1)=z(i*n+1:(i+1)*n);
end;