Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

algorithm of gradient?

Status
Not open for further replies.

mapi

Mechanical
Jan 30, 2007
53
0
0
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
 
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
 
Status
Not open for further replies.
Back
Top