hello,
i have 2 upper triangular matrices A and B.. the values are stored in efficient format in the text file. I wanted to use those values for matrix multiplication and display the result C on the screen.
I am supposed to use 1d arrays. SO, basically i have 2 --> 1d arrays which i am supposed to multiply to get C[i].C[i] must not store zeroes(i.e it must also be in efficient format).
I am having trouble in the multiplication part... i am getting answers totally out of range for C[i].
int i,j,k,m=0,n=0;
for(i=row;i>0;i--){
for(j=m;j<sum;j++){
for(k=0;k<=j;k++){
matC[j] += matA[k]*matB[j];
}
} m++;
printf("\n");
}
/**** 'sum' is the total slots in the C[i] array****/
I am having trouble developing the equation to put within the for loop.
for ex: A[i]={1,2,3,4,5,6} /*efficient format*/
B[i]={1,2,3,4,5,6}
I need to calculate
C[i] ={ }... i am stuck.. i hope the question is clear
any help would be great.
thanks in advance