Delete the nan values
data(isnan(data)) = [];
[H1,p_value1] = Mann_Kendall(data, 0.05);
or set them to zeros
data(isnan(data)) = 0;
[H1,p_value1] = Mann_Kendall(data, 0.05);
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!