Sensitivity analysis using finite differences

5 次查看(过去 30 天)
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

回答(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