BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
di_niu0
Obsidian | Level 7

Hi there. I am converting some Matlab code to SAS code. In Matlab, there is a built-in function that calculates the matrix exponential of a matrix called EXPM. There is no such built-in function for PROC IML. Does anyone know how to write the SAS code to produce the same result as EXPM? Thank you! 

1 ACCEPTED SOLUTION
3 REPLIES 3
data_null__
Jade | Level 19

I think you need IML EXP function.

proc iml;
   /* Define the matrix A */
   A = {0 1, -1 0};

   /* Compute the matrix exponential */
   expA = exp(A);

   /* Print the result */
   print expA;
quit;
Rick_SAS
SAS Super FREQ

@di_niu0 wrote:

Hi there. I am converting some Matlab code to SAS code. In Matlab, there is a built-in function that calculates the matrix exponential of a matrix called EXPM. There is no such built-in function for PROC IML. Does anyone know how to write the SAS code to produce the same result as EXPM? Thank you! 


I think you are mistaken. The SAS IML language has supported the EXPMATRIX function, which computes the exponential of a matrix, for 20+ years.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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