Helps a bit, but knowing which line would make our job easier...
At a guess, it's this line:
m[h,j] =(int)a[i]+(int)a[i+1] ;
and it implies that
does not contain integers. So start by looking at what exactly Tab_Mat does return, then use the debugger to find out exactly what is in
a[i + 1]
when the problem occurs.
We can't do that for you: we don't have any access to your code while it's running!