Fréchet derivative of the matrix exponential. function [D, fX] = dexpm(X, H) Computes the directional derivative (the Fréchet derivative) of expm at X along H (square matrices). Thus, D = lim_(t -> 0) (expm(X + tH) - expm(X)) / t. Note: the adjoint of dexpm(X, .) is dexpm(X', .), which is a fact often useful to derive gradients of matrix functions involving expm(X). (This is wrt the inner product inner = @(A, B) real(trace(A'*B))). The second output is fX = expm(X), though it may be less accurate. See also: dfunm dlogm dsqrtm

- dfunm Fréchet derivative of matrix functions.

0001 function [D, fX] = dexpm(X, H) 0002 % Fréchet derivative of the matrix exponential. 0003 % 0004 % function [D, fX] = dexpm(X, H) 0005 % 0006 % Computes the directional derivative (the Fréchet derivative) of expm at X 0007 % along H (square matrices). 0008 % 0009 % Thus, D = lim_(t -> 0) (expm(X + tH) - expm(X)) / t. 0010 % 0011 % Note: the adjoint of dexpm(X, .) is dexpm(X', .), which is a fact often 0012 % useful to derive gradients of matrix functions involving expm(X). 0013 % (This is wrt the inner product inner = @(A, B) real(trace(A'*B))). 0014 % 0015 % The second output is fX = expm(X), though it may be less accurate. 0016 % 0017 % See also: dfunm dlogm dsqrtm 0018 0019 % This file is part of Manopt: www.manopt.org. 0020 % Original author: Nicolas Boumal, July 3, 2015. 0021 % Contributors: 0022 % Change log: 0023 % 0024 % June 14, 2019 (NB): now also outputs expm(X) as a by-product. 0025 0026 [D, fX] = dfunm(@expm, X, H); 0027 0028 end

Generated on Fri 30-Sep-2022 13:18:25 by