Connecting Tech Pros Worldwide Help | Site Map

Raising Matrix to Negative Power

Newbie
 
Join Date: Nov 2007
Posts: 1
#1: Nov 19 '07
I am having problems raising a matrix to a negative power. I am relatively new to Ruby, so please forgive me if I have missed something obvious.

The software I am using is basically a GIS-type that allows ruby coded interrogation/assignment of its input. It has a class called OtMatrix that seems to be preventing me from applying a negative power to it, by saying that it cannot be coerced to a fixnum.

Here is the basic code...

elas = 0.24 # I have stored it as a positive and used as denominator
matrix2 = 1/matrix**(elas)


All ideas gratefully recieved!
Newbie
 
Join Date: Sep 2008
Posts: 1
#2: Sep 24 '08

re: Raising Matrix to Negative Power


You cannot multiply a matrix to a negative power.
Member
 
Join Date: Nov 2007
Posts: 72
#3: Oct 13 '08

re: Raising Matrix to Negative Power


Quote:

Originally Posted by brendanriley

You cannot multiply a matrix to a negative power.

what about the Unity Matrix then? Isn't that the original matrix to power -1 ?
Newbie
 
Join Date: Sep 2009
Posts: 1
#4: Sep 29 '09

re: Raising Matrix to Negative Power


Actually, the unity matrix should not be seen as the matrix to power (-1), as the (-1) is only a representation for the inverse matrix, similarly to the the inverse of other things, such as f^(-1). It is therefore not raised to any power, it is just a way of notation.
Reply