Bonjour à tous,

j'ai coder une fonction qui calcule une information a partir d'une matrice et qui store cette information dans une autre matrice, je vous montre le code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
void update(int start, int end, int ny, float *u1, float *u2, float *td, float *h)
{
  int ix, iy;
  for (ix = start; ix <= end; ix++)
    for (iy = 1; iy <= ny-2; iy++)
      *(u2+ix*ny+iy) = (float)
			(1-4 * (td/(h*h))) *
				(*(u1+ix * ny+iy)) + 
				 (td/(h * h)) * 
				  ((*(u1+(ix-1) * ny+iy)) + (*(u1+(ix-1) * ny+iy)) + (*(u1+ix * ny+(iy+1))) + (*(u1+ix * ny+(iy-1))));
}
Cependant à la compilation j'obtiens l'erreur suivante :


main.c:237: error: invalid operands to binary *
main.c:239: error: invalid operands to binary *

La ligne 237 est (1-4 * (td/(h*h))) *
La ligne 239 est (td/(h * h)) *

Quelqu'un a un idée?

Je ne suis pas trop habituer avec les tableaux à 3 dimension

Merci