Algorithm to invert an array 
Author Message
 Algorithm to invert an array

I have to write an algorithm to computer the inverse of a 2x2 array.  I have
no clue. Can anyone help me?

Thanks

Monty



Sat, 21 Sep 2002 03:00:00 GMT  
 Algorithm to invert an array
Monty, what do you mean by "inverse" ?  If you are talking about
mathematical inverse for a 2x2 matrix, then somthing like

det = 1/ ( a(0,0) * a(1,1) - a(0,1)*a(1,0))
temp = a(0,0)
a(0,0) = a(1,1)
a(1,1) = temp
a(0,0) = - a(0,0)
a(0,1) = - a(0,1)
For i = 0 to 1
    a(0,i) = det * a(0,i)
    a(1,i) = det * a(1,i)
Next i


Quote:
> I have to write an algorithm to computer the inverse of a 2x2 array.  I
have
> no clue. Can anyone help me?

> Thanks

> Monty



Mon, 23 Sep 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Algorithm to invert an array

2. Looking for an algorithm for building an index-array for sorting an array or database table

3. Algorithm to randomise an array

4. Sorting Algorithm for Arrays

5. Mul/Div Arrays Algorithm ? Know anyone a SUMPRODUCT() algorithm?

6. invert selection in a document

7. How to invert VScrollbar in VB.Net ?

8. Drawing with inverted colors

9. inverting a datagrid...

10. Faster Swapping - Inverting Routines?

11. Invert a Matrix

12. Invert Matrix

 

 
Powered by phpBB® Forum Software