public void saveForDiffusionCalculationsAtLastBiotick(int randomSeed, float diffusionLengthScale) { string[][] varDiffFromOriginPointAtLastBiotick = new string[1][]; string[] biotickAverageDistance = new string[1]; float sumOfDistance = 0; foreach (Vector3 position in unBoundReceptorsPositionsSS) { sumOfDistance += Utils.calcArcDistance(allReceptorsOriginPoint, cell.globalToLocal(position), cell.radius); } // find the square mean of the distances biotickAverageDistance[0] = Mathf.Pow(sumOfDistance / unBoundReceptorsPositionsSS.Count(), 2).ToString(); // save the array varDiffFromOriginPointAtLastBiotick[0] = (string[])biotickAverageDistance.Clone(); // no need for cell name, because we use both cells to get different seeds. saveToCsv("diffusion_calculations/", "varOfDistanceFromOrigin_seed=" + randomSeed + "_diffusion_length_scale=" + diffusionLengthScale, varDiffFromOriginPointAtLastBiotick); }