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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculation of derivatives from a data set

Status
Not open for further replies.

modelling

Technical User
Aug 31, 2009
7
DE
Hi, I have a data set like
x[1],..,x,..,x[n]
y[1],..,y,..,y[n]
But there is no function like y = f(x), it is unknown, and the step between the x values is not constant.
x values are calculated separately from y, but finally i have to find partial derivative like dy/dx.

Can I calculate it with
for i=1,..,n-1:
dy = (y(i+1]-y)/(x(i+1]-x)?

Or do I need to use cubic spline and then from spline parameters find the derivative? I read about it, but for me it is complicated to program such a routine.


Thank's in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top