Merge branch 'fixf'
[wrf-fire-matlab.git] / detection / plot_like.m
blob58ca20be7c7b5a4e7bbe8f1f96e7d82fb6789c20
1 function plot_like(nodetw,stretch)
2 Tmin=stretch(1);Tmax=stretch(2);Tneg=stretch(3);Tpos=stretch(4);
3 T=[Tmin-3*Tneg,Tmax+3*Tpos];
4 n=1000;
5 t=[T(1):(T(2)-T(1))/n:T(2)];
6 [v0_n,v1_n]=like1(-nodetw,t,stretch);
7 [v0_y,v1_y]=like1(1,t,stretch);
8 figure(11)
9 plot(t,v0_n,'--',t,v0_y,'-')
10 title('Data log likelihood')
11 xlabel('Time from fire arrival (h)')
12 legend('No fire detection','Fire detected')
13 va=1;
14 a=axis;a(3)=-va;a(4)=va;axis(a)
15 grid
16 figure(12)
17 plot(t,v1_n,'--',t,v1_y,'-')
18 title('Forcing')
19 xlabel('Time from fire arrival (h)')
20 legend('No fire detection','Fire detected')
21 a=axis;a(3)=-va;a(4)=va;axis(a)
22 grid
23 end