I have read through all the answers to similar questions and have tried a bunch of different permutations but nothing seams to work! I've spent the last 4-5h trying to get around I keep getting the same result. Please help!
here is my problematic code: I need to copy the contents of the cruMatrix into cruMatric_tm1 on each iteration. I've left some of the things I've tried commented out
while (true)
{
//cruMatrix = new List<double[]>();
//cruMatrix = cruMatrix_tm1.ToList();
T1 = new Thread(updateCaConcentration); T1.Start(); T1.Join();
T2 = new Thread(updateSystemState); T2.Start(); T2.Join();
//cruMatrix_tm1.Clear();
systemUpdate();
plotOpenVsTime(ref time);
//cruMatrix_tm1 = new List<double[]>(cruMatrix);
cruMatrix_tm1 = new List<double[]>();
foreach(double[] arr in cruMatrix){
cruMatrix_tm1.Add(arr);
}
run++;
if (run > runUntil) break;
time++;
}