473,554 Members | 3,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Raising Matrix to Negative Power

1 New Member
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 8591
1 New Member
You cannot multiply a matrix to a negative power.
Sep 24 '08 #2
221 New Member
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
1 New Member
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

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

Similar topics

by: Jason Robertson | last post by:
Hi, I am using Web Matrix Project as .NET programming environment. Can you show me detailed steps how to import the .ocx library into the Web Matrix Project. I can't seem to be able to import other assembly than .dll, .exe or ..mcl . I am pretty new to the .NET programming environment, and may be missing something. I can see the file in...
by: Paul McGuire | last post by:
I've posted a simple Matrix class on my website as a small-footprint package for doing basic calculations on matrices up to about 10x10 in size (no theoretical limit, but performance on inverse is exponential). Includes: - trace - transpose - conjugate - determinant - inverse - eigenvectors/values (for symmetric matrices)
by: Hallvard B Furuseth | last post by:
As far as I can tell, (x & -1) is nonzero if the integer x is negative zero. So for signed types, x == 0 does not guarantee (x & foo) == 0. Is that right? (Not that I expect to ever encounter a non-two's-complement machine. Just wondering.) -- Hallvard
by: Zhengzheng Pan | last post by:
Hi all, I'm trying to check whether a (stochastic/transition) matrix converges, i.e. a function/method that will return True if the input matrix sequence shows convergence and False otherwise. The background is a Markov progress, so the special thing about the transition matrix is the values of elements in each row add up to be 1. Fail to...
by: thatwhiteguy | last post by:
I am trying to create a function that computes a negative exponent. This is what I have, but it is not returning the proper answer. I was wondering if anyone can see where I have gone wrong. Thanks //This function raises 1+AIR to a negative n power float power (int num_of_pay, float number) { float result; int i; double AIR;
by: Mark | last post by:
I'm trying to figure out the best way to go about doing this. I have a "map" for a game, which I'd like to store in a matrix. Some cells will be empty (NULL), and some will hold objects. I need a matrix so that I can quickly find neighboring cells. However, when create this map, I don't know what size it is going to be, so it needs to be...
by: skanemupp | last post by:
how do i solve power(5,1.3)? def power(nbr, po): if po==0: return 1 if po>0: return nbr*power(nbr, po-1) if po<0: return 1/power(nbr, -1*po)
by: Sozos | last post by:
Hi guys. I have a problem with writing the base case for the following matrix multiplication function I have implemented. Please help. #define index(i,j,power) (((i)<<(power))+(j)) void recMultiply(int i, int j, float a, int k, int l, float b, int x, int y, float c, int s); int i, j, k, s, matrixsize, blocksize, jj, kk, power, bsize;...
by: almurph | last post by:
Hi everyone, Concerning the Needleman-Wunsch algorithm (cf. http://en.wikipedia.org/wiki/Needleman-Wunsch_algorithm) I have noticed a possible loop. Inside the algorithm there is an important decision making mechanism. Its a "if, else if, else if" structure like:
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.