Sensitivity analysis using finite differences

5 ビュー (過去 30 日間)
Patience Shamaki
Patience Shamaki 2020 年 2 月 12 日
コメント済み: Wang Hong 2020 年 2 月 22 日
Please I need help obtaining the sensitivity of the outputs of a system with respect to the inputs using finite difference. I tried to follow this question https://www.mathworks.com/matlabcentral/answers/328722-matlab-simple-loop-for-different-function-variables-finite-difference but I can seem to figure it out.
So in my case the right hand side of my differential equation :
dy/dt= f(x,u)
dy/dt=[u1 - x9;
u2 - x10;
x9+ x11- x13;
x10 + x12 - x14;
x15 - x17;
x16 - x18;
(x13 + x14) - x19;
(x17+x18) - x20];
I want to obtain the sensitivities of x1- x8 (which are my main variables) with changes in u1 and u2 which are my inputs and are constant values; (dy/du) using the finite differences method.
N.B: x9 - x20 are functions of x1 -x8, I have their equations solved and then substituted into the differential equation. I just need someone to help me with how to write the finite equations with changes in u rather than x as in the example above.
I hope my question is clear, I am still learning matlab.
thanks
  1 件のコメント
Wang Hong
Wang Hong 2020 年 2 月 22 日
you can use symbolic expression to solve it

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by