As shown in the following figure, for the Hants Harmonic analysis of the single pixels of the vegetation growth season curve, now using a one-element six-time polynomial to fit the curve, and to solve the phenological parameters (beginning and end), in MATLAB programming implementation:
Code:
Year0=zeros (38998,1);
For i=1:1:38998
if M (i,:) ==0
continue;
End
Corrcoficent=polyfit (x,m (i,:), 6);
N=[corrcoficent (1), Corrcoficent (2), Corrcoficent (3), Corrcoficent (4), Corrcoficent (5), corrcoficent (6), Corrcoficent (7)-shreold (i)];
Year=roots (N);
For J=1:1:6
if Isreal (j) && Year (j) >210 && Year (j) <360
Year0 (i) =year (j);
End-end
fprintf (Num2str (i)); fprintf (' \ n ')
; End
fprintf (' \ n ');
fprintf (' done ');
Code Explanation:
Train of thought: by means of 38,998 pixels of an existing image, a six-time polynomial is established, and obtain the coefficient, thus obtains the concrete expression of a six times polynomial, and then the days corresponding to the phenological period are reversed by selecting the phenological threshold (the dynamic threshold in Excel) for the number of days to line up the phenology.
1, Year0=zeros (38998,1): Declare an array of 38998 rows 1 columns
2, Corrcoficent=polyfit (X,m (i,:), 6): Get coefficient
3, N: six root
4, Year0 inside Save the final result