1 function like_test(like)
4 [p0,p1]=like(1,t,stretch);
5 [nn0,nn1]=like(-1,t,stretch);
6 n0 = log(1-exp(p0)); % exp(p0) + exp(n0)=1;
7 n1 = -exp(p0).*p1 ./exp(n0); % exp(p0)*p1 + exp(n0)*n1=0;
8 err0=big(n0-p0), err1=big(n1-p1)
9 [n0,n1]=like(-1,t,stretch);
12 plot(t,p0,'-',t,n0,'--');
13 xlabel('Time since fire arrival (h)')
14 ylabel('Log probability')
15 legend('Fire detected','Land/water no fire')