BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a critical problem.I need to raise a matrix to certain power using (##)operator,the problem is that the power is negative fraction and some elements of the matrix are negative fraction also.the program returuns an error message each time I run it and confirms that the operation couldnot be performed.I donot know how to solve this problem.please I ask for help
Best Regards,
Amani
4 REPLIES 4
Hutch_sas
SAS Employee
I assume here that you want to raise the elements of a matrix to a power (and not a matrix to a power) since you are using the ## operator. In general r to the a power will be multi-valued and complex if r is non-negative and a is non-integer, so the question arises, how do you want to handle complex values, and how do you want to choose a particular answer? It might be helpful to look at how these numbers arise and how you are using them?
Hutch_sas
SAS Employee
Oops, I meant to say :

In general r to the a power will be multi-valued and complex if r is negative and a is non-integer
deleted_user
Not applicable
Do you mean that SAS couldnot handle complex numbers and there isnot operators that can be used to calculate what I need in SAS?
If I need to solve this problem I have to write my program on other package that can solve this problem .e.g,MATLAB,?Oh!!!!!!
Best Regards,
Amani
Hutch_sas
SAS Employee
No, what I am saying is that no matter what package you use, when you start dealing in the complex plane things become much more complicated. Raising a number to a power is straight-forward in real arithmetic using real numbers, but in the complex plane if the exponent is not integral there are multiple answers with different physical interpretations. In order to know what to do you need to understand how you got to that situation in the first place and what you are really looking for. See http://en.wikipedia.org/wiki/Exponential_function#On_the_complex_plane

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 4 replies
  • 2020 views
  • 0 likes
  • 2 in conversation