- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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.