Not Yet Answered # Matrix Inversion

Discussion Starter Maryam_6 Maritimo 15 mike_2000_17 2,669 ddanbe 2,467 Discussion Starter Maryam_6 Discussion Starter Maryam_6 Need some help with this Array. I am trying to get the sum of the even numbers and the sum of the odd numbers using a for each loop. I know the answers to what I am trying to achive are sum of even = 84 and the sum of ...

0

I don't have any idea how to do it using link list.Please give me some idea.

*Edited 1 Year Ago by Maryam_6*

0

Daniweb is not a homework service. Please provide evidence that you've attempted a solution on your own.

0

Linked lists have nothing to do with matrices, as far as I know. And even if they did, it would be beyond idiotic to use them in that context.

And as Maritimo pointed out, we are not in the business of doing people's homeworks for them. We provide help in the form of explanations and hints to people who have shown genuine efforts towards solving the problem themselves.

As for matrix inversion and LU decomposition, I would suggest you just start with the wiki page on LU and the section on how to invert a matrix with it.

0

Sparse matrices usually have a linked list implementation, I think an Excel sheet is implemented that way.

0

Sorry i am not asking for the code please give me idea how to compare rows in row operation.

0

Here is the code for multiplication

```
matrix* Matrix_Multiplication (matrix* A,matrix* B)
{
if(B->get_rows()!=A->get_col())
{
cout<<"\nInvalid dimensions, cannot multiply\n";
return NULL;
}
else
{
matrix* C = new matrix;
matC->set_row(A->get_rows());
matC->set_col(B->get_col());
for (int i=0;i < C->get_rows();i++)
{
C->row_head.push_back(NULL);
}
for (int i = 0; i<A->get_rows(); i++)
{
//element* itC=matC->row_head[i];
element* itC=NULL;
for (int j = 0; j < B->get_col(); j++)
{
float sum = 0;
for (int k = 0; k< A->get_col(); k++)
{
sum =sum + (find_at_index(A,i+1,k+1) * find_at_index(B,k+1,j+1) );
}
//C[row][col] = sum;
if(sum!=0)
{
element* number=new element;
number->set_value(sum);
number->set_col(j+1);
if(matC->row_head[i]==NULL)
{
matC->row_head[i]=number;
itC=number;
}
else
{
itC->set_next(number);
itC=number;
}
}
}
}
return C;
}
}
```

This article has been dead for over six months. Start a new discussion instead.

Recommended Articles

When I execute this progammatically, I get a table with row heights much larger than when I do this manually.

Note : Sel is the Word.Selection object and the Clipboard contains an Excel Table.

```
public void AddClipboard()
{
Sel.PasteExcelTable(false,false, false);
var t = Sel.Tables[Sel.Tables.Count];
t.AutoFitBehavior(Word.WdAutoFitBehavior.wdAutoFitContent);
}
```

the function that I created to find the ...