# exponential matrix

Is there a command to compute the exponential of a matrix using GAUSS? I am not talking about the element by element exponential. I talking about the exponential of a matrix as given in the following definition:

https://en.wikipedia.org/wiki/Matrix_exponential

0

GAUSS does not have a built-in function for this yet, however, this code should do what you want:

``````A = { -0.57417717      -0.87184947       0.72815309      -0.75585604,
2.5429514       0.81242011    -0.0053033693      -0.67348003,
-0.50066776       -2.1355249        1.8998340       -2.0122135,
-1.6892236      -0.77342078      -0.77691244      -0.27255544 };
emat = expm(A);

proc (1) = expm(A);
local eval, evec, out;
{ eval, evec } = eigv(A);

out = evec * (eye(rows(eval)) .* exp(eval)) * inv(evec);

retp(real(out));
endp;``````
``` Where emat should end up as: -0.84691011 -2.2387765 2.0983160 -1.1356752 2.5053272 -0.71110282 3.5202087 -3.1394592 -4.2278307 -6.5585548 7.4120945 -3.6513710 -0.57884903 2.3984690 -4.1551865 3.3012497 ```
```aptech1,728 ```
``` ```
` `
``` You must login to post answers. ```
``` Forum Search Login Username Password Remember Me RegisterLost PasswordRecent TopicsCall a procedure after optimisationabout konya panel causalityPlotting histogram overlayed with kernel estimatort distributionFlip order of a vectorUser Forum Join our community to see why our users are considered some of the most active and helpful in the industry! User Forum ```
``` Have a Specific Question? Get a real answer from a real person Need Support? Get help from our friendly experts. ```
``` Try GAUSS for 14 days for FREE See what GAUSS can do for your data GAUSS is the product of decades of innovation and enhancement by Aptech Systems, a supportive team of experts dedicated to the success of the worldwide GAUSS user community. Aptech helps people achieve their goals by offering products and applications that define the leading edge of statistical analysis capabilities. GET IN TOUCH WITH US .first-row td { padding: 0px 15px; vertical-align: text-top; } .second-row td { padding: 15px 15px 0px; vertical-align: text-top; } Email: [email protected] Hours of Operation (AZ MST): Monday-Thursday: 8:00 AM - 4:00 PM Friday: 8:00 AM - 3:00 PM Phone: (360) 886-7100 FAX: (360) 886-8922 Address: Aptech Systems, Inc PO Box 618 Higley, AZ 85236 © document.write(new Date().getFullYear()) Aptech Systems, Inc. All rights reserved. Privacy Policy ```
``` Thank you for signing up! .saboxplugin-wrap{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;border:1px solid #eee;width:100%;clear:both;display:block;overflow:hidden;word-wrap:break-word;position:relative}.saboxplugin-wrap .saboxplugin-gravatar{float:left;padding:0 20px 20px 20px}.saboxplugin-wrap .saboxplugin-gravatar img{max-width:100px;height:auto;border-radius:0;}.saboxplugin-wrap .saboxplugin-authorname{font-size:18px;line-height:1;margin:20px 0 0 20px;display:block}.saboxplugin-wrap .saboxplugin-authorname a{text-decoration:none}.saboxplugin-wrap .saboxplugin-authorname a:focus{outline:0}.saboxplugin-wrap .saboxplugin-desc{display:block;margin:5px 20px}.saboxplugin-wrap .saboxplugin-desc a{text-decoration:underline}.saboxplugin-wrap .saboxplugin-desc p{margin:5px 0 12px}.saboxplugin-wrap .saboxplugin-web{margin:0 20px 15px;text-align:left}.saboxplugin-wrap .sab-web-position{text-align:right}.saboxplugin-wrap .saboxplugin-web a{color:#ccc;text-decoration:none}.saboxplugin-wrap .saboxplugin-socials{position:relative;display:block;background:#fcfcfc;padding:5px;border-top:1px solid #eee}.saboxplugin-wrap .saboxplugin-socials a svg{width:20px;height:20px}.saboxplugin-wrap .saboxplugin-socials a svg .st2{fill:#fff; transform-origin:center center;}.saboxplugin-wrap .saboxplugin-socials a svg .st1{fill:rgba(0,0,0,.3)}.saboxplugin-wrap .saboxplugin-socials a:hover{opacity:.8;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;box-shadow:none!important;-webkit-box-shadow:none!important}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-color{box-shadow:none;padding:0;border:0;-webkit-transition:opacity .4s;-moz-transition:opacity .4s;-o-transition:opacity .4s;transition:opacity .4s;display:inline-block;color:#fff;font-size:0;text-decoration:inherit;margin:5px;-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;-o-border-radius:0;border-radius:0;overflow:hidden}.saboxplugin-wrap .saboxplugin-socials .saboxplugin-icon-grey{text-decoration:inherit;box-shadow:none;position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:middle;zoom:1;margin:10px 5px;color:#444;fill:#444}.clearfix:after,.clearfix:before{content:' ';display:table;line-height:0;clear:both}.ie7 .clearfix{zoom:1}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitch{border-color:#38245c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-addthis{border-color:#e91c00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-behance{border-color:#003eb0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-delicious{border-color:#06c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-deviantart{border-color:#036824}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-digg{border-color:#00327c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-dribbble{border-color:#ba1655}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-facebook{border-color:#1e2e4f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-flickr{border-color:#003576}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-github{border-color:#264874}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-google{border-color:#0b51c5}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-googleplus{border-color:#96271a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-html5{border-color:#902e13}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-instagram{border-color:#1630aa}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-linkedin{border-color:#00344f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-pinterest{border-color:#5b040e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-reddit{border-color:#992900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-rss{border-color:#a43b0a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-sharethis{border-color:#5d8420}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-skype{border-color:#00658a}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-soundcloud{border-color:#995200}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-spotify{border-color:#0f612c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stackoverflow{border-color:#a95009}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-steam{border-color:#006388}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-user_email{border-color:#b84e05}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-stumbleUpon{border-color:#9b280e}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-tumblr{border-color:#10151b}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-twitter{border-color:#0967a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vimeo{border-color:#0d7091}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-windows{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-whatsapp{border-color:#003f71}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-wordpress{border-color:#0f3647}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-yahoo{border-color:#14002d}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-youtube{border-color:#900}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-xing{border-color:#000202}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mixcloud{border-color:#2475a0}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-vk{border-color:#243549}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-medium{border-color:#00452c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-quora{border-color:#420e00}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-meetup{border-color:#9b181c}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-goodreads{border-color:#000}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-snapchat{border-color:#999700}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-500px{border-color:#00557f}.saboxplugin-socials.sabox-colored .saboxplugin-icon-color .sab-mastodont{border-color:#185886}.sab-patreon{border-color:#fc573b}.sabox-plus-item{margin-bottom:20px}@media screen and (max-width:480px){.saboxplugin-wrap{text-align:center}.saboxplugin-wrap .saboxplugin-gravatar{float:none;padding:20px 0;text-align:center;margin:0 auto;display:block}.saboxplugin-wrap .saboxplugin-gravatar img{float:none;display:inline-block;display:-moz-inline-stack;vertical-align:middle;zoom:1}.saboxplugin-wrap .saboxplugin-desc{margin:0 10px 20px;text-align:center}.saboxplugin-wrap .saboxplugin-authorname{text-align:center;margin:10px 0 20px}}body .saboxplugin-authorname a,body .saboxplugin-authorname a:hover{box-shadow:none;-webkit-box-shadow:none}a.sab-profile-edit{font-size:16px!important;line-height:1!important}.sab-edit-settings a,a.sab-profile-edit{color:#0073aa!important;box-shadow:none!important;-webkit-box-shadow:none!important}.sab-edit-settings{margin-right:15px;position:absolute;right:0;z-index:2;bottom:10px;line-height:20px}.sab-edit-settings i{margin-left:5px}.saboxplugin-socials{line-height:1!important}.rtl .saboxplugin-wrap .saboxplugin-gravatar{float:right}.rtl .saboxplugin-wrap .saboxplugin-authorname{display:flex;align-items:center}.rtl .saboxplugin-wrap .saboxplugin-authorname .sab-profile-edit{margin-right:10px}.rtl .sab-edit-settings{right:auto;left:0}img.sab-custom-avatar{max-width:75px;}.saboxplugin-wrap .saboxplugin-authorname {font-family:"Lato";}.saboxplugin-wrap .saboxplugin-desc {font-family:Lato;}.saboxplugin-wrap {margin-top:0px; margin-bottom:0px; padding: 0px 0px }.saboxplugin-wrap .saboxplugin-authorname {font-size:18px; line-height:25px;}.saboxplugin-wrap .saboxplugin-desc p, .saboxplugin-wrap .saboxplugin-desc {font-size:14px !important; line-height:21px !important;}.saboxplugin-wrap .saboxplugin-web {font-size:14px;}.saboxplugin-wrap .saboxplugin-socials a svg {width:18px;height:18px;}.saboxplugin-tabs-wrapper { width: 100%; display: block; clear: both; overflow: auto; } .saboxplugin-tabs-wrapper ul{ margin:0px; padding: 0px; } .saboxplugin-tabs-wrapper ul li { list-style: none; float: left; color: #222222; padding: 8px 20px; background-color: #e4e4e4; box-sizing: border-box; margin-right: 1px; border-bottom: 1px solid #c7c7c7; } .saboxplugin-tabs-wrapper ul li.active, .saboxplugin-tabs-wrapper ul li:hover{ color: #222222; background-color: #efefef; border-bottom: 1px solid #c7c7c7; cursor:pointer; } .saboxplugin-tab{ padding:20px; } .saboxplugin-tab ul{ margin:0px; padding: 0px; } .saboxplugin-tab ul li{ list-style: none; }.saboxplugin-authorname .sabox-job-title{font-size:12px;opacity:.7;display: inline-block;margin-left: 10px;} /* <![CDATA[ */ var wpcf7 = {"api":{"root":"https:\/\/www.aptech.com\/wp-json\/","namespace":"contact-form-7\/v1"}}; /* ]]> */ /* <![CDATA[ */ var helpful = {"ajax_url":"https:\/\/www.aptech.com\/wp-admin\/admin-ajax.php","ajax_data":{"user_id":"236f4e7495f9c957ac1b6ef7b8cf59cd","_wpnonce":"ac19fe4454"},"translations":{"fieldIsRequired":"This field is required."},"user_voted":{"user_id":"236f4e7495f9c957ac1b6ef7b8cf59cd","post_id":11274,"action":"helpful_has_user_voted","_wpnonce":"632984531c"},"post_id":"11274","ajax_session":{"helpful_user":"236f4e7495f9c957ac1b6ef7b8cf59cd","core":{"_session_validator_data":{"remote_addr":"3.236.209.138","http_via":"","http_x_forwarded_for":"","http_user_agent":"CCBot\/2.0 (https:\/\/commoncrawl.org\/faq\/)","session_expire_timestamp":1679736761}},"checkout":{"_session_validator_data":{"remote_addr":"3.236.209.138","http_via":"","http_x_forwarded_for":"","http_user_agent":"CCBot\/2.0 (https:\/\/commoncrawl.org\/faq\/)","session_expire_timestamp":1679736761}}}}; /* ]]> */ /* <![CDATA[ */ var pum_vars = {"version":"1.17.1","pm_dir_url":"https:\/\/www.aptech.com\/wp-content\/plugins\/popup-maker\/","ajaxurl":"https:\/\/www.aptech.com\/wp-admin\/admin-ajax.php","restapi":"https:\/\/www.aptech.com\/wp-json\/pum\/v1","rest_nonce":null,"default_theme":"21640","debug_mode":"","disable_tracking":"","home_url":"\/","message_position":"top","core_sub_forms_enabled":"1","popups":[],"analytics_route":"analytics","analytics_api":"https:\/\/www.aptech.com\/wp-json\/pum\/v1"}; var pum_sub_vars = {"ajaxurl":"https:\/\/www.aptech.com\/wp-admin\/admin-ajax.php","message_position":"top"}; var pum_popups = {"pum-21652":{"triggers":[],"cookies":[],"disable_on_mobile":false,"disable_on_tablet":false,"atc_promotion":null,"explain":null,"type_section":null,"theme_id":"21646","size":"custom","responsive_min_width":"0%","responsive_max_width":"100%","custom_width":"360px","custom_height_auto":true,"custom_height":"380px","scrollable_content":false,"animation_type":"fade","animation_speed":"350","animation_origin":"center top","open_sound":"none","custom_sound":"","location":"right bottom","position_top":"100","position_bottom":"0","position_left":"0","position_right":"0","position_from_trigger":false,"position_fixed":true,"overlay_disabled":true,"stackable":false,"disable_reposition":false,"zindex":"1999999999","close_button_delay":"0","fi_promotion":null,"close_on_form_submission":false,"close_on_form_submission_delay":"0","close_on_overlay_click":true,"close_on_esc_press":true,"close_on_f4_press":false,"disable_form_reopen":false,"disable_accessibility":false,"theme_slug":"aptech","id":21652,"slug":"thank-you"}}; /* ]]> */ /* <![CDATA[ */ var wpcf7cf_global_settings = {"ajaxurl":"https:\/\/www.aptech.com\/wp-admin\/admin-ajax.php"}; /* ]]> */ /* <![CDATA[ */ var wpcf7_recaptcha = {"sitekey":"6Lf8Ln0UAAAAALE3vXP6zpQ4lsuw93talItU7HWt","actions":{"homepage":"homepage","contactform":"contactform"}}; /* ]]> */ /* <![CDATA[ */ var megamenu = {"timeout":"300","interval":"100"}; /* ]]> */ /* <![CDATA[ */ var sidebar_login_params = {"ajax_url":"\/wp-admin\/admin-ajax.php","force_ssl_admin":"0","is_ssl":"1","i18n_username_required":"Please enter your username","i18n_password_required":"Please enter your password","error_class":"sidebar-login-error"}; /* ]]> */ jQuery(document).ready(function(\$) { \$( '.mega-search-trigger .mega-menu-link' ).on( 'focus, click', function( event ) { event.preventDefault(); \$( '#full-screen-search' ).addClass( 'open' ); \$( '#full-screen-search input' ).focus(); }); }); ```