472,143 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Raising Matrix to Negative Power

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!
Nov 19 '07 #1
3 8416
You cannot multiply a matrix to a negative power.
Sep 24 '08 #2
Airslash
221 100+
You cannot multiply a matrix to a negative power.
what about the Unity Matrix then? Isn't that the original matrix to power -1 ?
Oct 13 '08 #3
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.
Sep 29 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Jason Robertson | last post: by
14 posts views Thread by Paul McGuire | last post: by
23 posts views Thread by Hallvard B Furuseth | last post: by
2 posts views Thread by Zhengzheng Pan | last post: by
10 posts views Thread by thatwhiteguy | last post: by
7 posts views Thread by Mark | last post: by
8 posts views Thread by skanemupp | last post: by
1 post views Thread by Sozos | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.