是否有任何适用于 MATLAB 的开源自动微分库?
我知道诸如Tomlab/MAD和大量 C++ 库之类的商业包,但是除了Matlab File Exchange 上的 Matlab 包的自动微分(不是主要包)之外,我找不到更多的 MATLAB包。
添加
作为最基本的功能,我需要能够将向量作为变量处理。例如,在那个 MathWorks 包中,我引用了一个测试用例:
val = [1 2 3]; %Some value
x = myAD(val); %Creates a vector with that value.
x .* [4 5 6]; %This should give the derivatives [4; 5; 6]
x_inner = sum(x.* x);% To get the inner product. The derivative here is [2 4 6] here
%Ideally, the above would simply be x_inner = x * x'