Good! I am having problems with the exposed error when I try to multiply the matrix A with the vector xk. The matrix A lame from an external input file. Would anyone know how to fix it ?. Thank you very much in advance! I attach the interesting parts of the code:
Matrix <double> A,B,C;
Vector <double> xk[9] = {27.0000, -0.000901816789824, 0, 0, 0, 0,0, -0.000901816789824 , 0};
int f,j,n, m, p,a,b,b2,c,tam;
double sum_aux=0;
a = 9;
A.resize(a, a);
//Para matriz A
{
getline(myfile, line);
std::istringstream is(line);
for (int i = 0; i < a; i++)
for (int j = 0; j < n; j++)
is >> A[i][j] >> ch;
}
for(f=1;f<=a;f++){
sum_aux=0;
for(j=1;j<=a;j++){
sum_aux=(double)A[f][j]*xk[j];
sum_aux=sum_aux + (double)A[f][j+1]*xk[j+1];
}
xk_aux[j]=sum_aux;
}