As Ujesh Mohanan, noted, my previous soulution was wrong, since you actually allocated the matrix. However you forgot the last item:
for (i=1;i<numt;i++)
{
umatrix[i]=new double [numt+1];
}
Should be instead
for (i=1;i<=numt;i++)
{
umatrix[i]=new double [numt+1];
}
Again, I strongly suggest you using
std::vector<double>
instead with messing with raw pointers.
By the way:
Quote:
delete umatrix,xmatrix,tmatrix;
is wrong.