function E = werr1(sig, F, t, N, bopt)

%   The function E = werr1(sig,F,t,N,bopt) computes
%   the error bound E = truncation plus conditioning error
%   on the optimal curve b = bopt(s).

s = sig; b = eval(bopt);
M = 2*N;
a = wcoef(F,M,sig,b);
a1 = a(2*N+1:3*N); sa1 = sum(abs(a1));
a2 = a(3*N+1:4*N); sa2 = sum(abs(a2));
E = exp(sig*t)*(sa2+eps*sa1);
E = log(E);









