function[nmb,nme,mb,me,rmse,corr] = calcStats_all(indices,observed,predicted)
%Computes the statistics for the entire field campaign given arrays of
%observed and predicted data



    obs = observed;
    predics = predicted;

    % Removing NaN values
    obs_n = obs(indices);
    predic_n = predics(indices);

    %double check that prediction and obs have the same sizes
    disp(size(predic_n))
    disp(size(obs_n))
 
    % Calculating NMB and NME
    nmb = (mean(predic_n) - mean(obs_n)) / mean(obs_n);
    nme = mean(abs(predic_n - obs_n)) / mean(obs_n);
    
    % Calculating MB and ME
    mb = mean(predic_n - obs_n);
    me = mean(abs(predic_n - obs_n));

    % Calculating RMSE
    rmse = sqrt(mean((predic_n - obs_n).^2));
    
    % Calculating CORR
    corr = corrcoef(predic_n, obs_n);
    corr = corr(1, 2);

    
