0

What I am trying to do is to copy a part of matrix to an other in order to create a submatrix. However, while the following part of code looks quiet logical to me, it results in absolutely nothing being copied into a destination.

void Copy(double **mt, int sx, int ex, int sy, int ey, double **res)
{
int i;
int t = sizeof(double)*(ey-sy+1);
for(i = 0; i < ex-sx+1; i++)
    memcpy(&mt[i][0],&res[sx+i][sy], t);
return;
}
RKT
  • 1
  • 1

0 Answers0