Hi, I'm new to this forum and C#.
I try to make an array that each is the sum of the value of each row in sims array.
It gives me nothing but zero. Please help. TIA.
public double[] ave_S(int M, int N, double S, double sig, double dt, double[,] R, double r)
{
double[,] sims = GetSim(M, N, S, sig, dt, R, r);
double[] temp = new double[M];
for (int i = 0; i < M; i++)
{
double temp_val = 0;
for (int j = 0; j < N; j++)
{
temp_val += sims[i, j];
}
temp[i] = temp_val;
}
return temp;
}