Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

algorithm of gradient?

Status
Not open for further replies.

mapi

Mechanical
Joined
Jan 30, 2007
Messages
53
Location
US
What is the algorithm of gradient?

FX=gradient(F,x);

FX(i)=(F(i+1)-f(i-1))/(x(i+1)-(i-1))??

How about FX(1) and the gradient at the last point?

Thanks,

Mapi
 
The first and last points are first order only. One is a foreward difference, the other a backward difference. All other points are (as you said) second order.

- Steve
 
Thanks. I check it and it indeed is.

Mapi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top