oneNN = 0; threeNN = 0; fiveNN = 0; cent = 0; avgcent = 0; centparam=0; numIterations = 5; for i=1:numIterations numFeatures = 40; run1overNsim; oneNN = oneNN + oneNNError; threeNN = threeNN + threeNNError; fiveNN = fiveNN + fiveNNError; cent = cent + centroidClassError; avgcent = avgcent + AvgcentroidClassError; centparam = centparam + centroidParamClassError; end oneNN = oneNN/numIterations threeNN = threeNN/numIterations fiveNN = fiveNN/numIterations cent = cent/numIterations avgcent = avgcent/numIterations centparam = centparam/numIterations