フィルターのクリア

Coding the Jacobian efficiently in MATLAB

8 ビュー (過去 30 日間)
Enrique
Enrique 2024 年 5 月 14 日
編集済み: Matt J 2024 年 5 月 14 日
How the Jacobian of F(t,u)= Au - u/1+u be computed in MATLAB? A is a square matrix. How best to compute the Jacobian in Exponential Rosenbrock integrator?
function Jn = J(u)
Jn = -A-1./(1+u).^2;
end

採用された回答

Matt J
Matt J 2024 年 5 月 14 日
編集済み: Matt J 2024 年 5 月 14 日
minusA = -A;
J=@(u) JacobianEngine(u,minusA);
function Jn = JacobianEngine(u,Jn)
p=numel(u);
Jn(1:p+1:end)= Jn(1:p+1:end) + (-1./(1+u).^2);
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumerical Integration and Differentiation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by