Central difference approximations to estimate a Jacobian matrxi

15 views (last 30 days)
I have two functions F(x,y) and G(x,y) defined in script files FM.m and GM.m and I need to use central difference approximations to estimate the Jacobian matrix J=[Fx(1,2) Fy(1,2);Gx(1,2) Gy(1,2)] where Fx,Fy,Gx,Gy denotes partial differentiation variable.
The central difference approximation is f'(x)=(f(x+h)-f(x-h))/2h.
Any help would be really appreciated, thanks!

Answers (1)

Torsten
Torsten on 17 Mar 2016
J(1,1)=(F(x+h,y)-F(x-h,y))/(2*h);
J(1,2)=(F(x,y+k)-F(x,y-k))/(2*k);
J(2,1)=(G(x+h,y)-G(x-h,y))/(2*h);
J(2,2)=(G(x,y+k)-G(x,y-k))/(2*k);
Best wishes
Torsten.

Categories

Find more on Linear Model Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!