Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • 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
Jan 30, 2007
53
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
 
Replies continue below

Recommended for you

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