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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by