[Scilab-users] Numerical Differentiation

Radovan Omorjan omorr at uns.ac.rs
Sat Mar 22 20:46:22 CET 2014


Hello,

You can try spline interpolation and numerical derivatives on that spline

//function for spline interpolation of x-y data
deff  ('[yk] = fspline(xx,x,y)',  ...
       'yk=interp(xx, x, y, splin(x,y))');
//
//Use the spline for finding derivatives
//
a=10  //give the point
numdiff(fspline,a)  //find the derivative at the point
//derivatives at the x points
for  i=1:length(x)
     dy(i)  =  numdiff(fspline,x(i));
     mprintf('x=%i, dy=%f\n',x(i),dy(i))
end

Regards,
Radovan

On 3/22/2014 7:00 PM, Samuel Enibe wrote:
> I would like to use the functions *derivative* or *numdiff* to 
> numerically differentiate a tabulated data such as
>
> x = [0 2 5 20 40 60 80]';//time in minutes
> y = [0.0956820 0.0480457 0.0277857 0.0036214 0.0002543 0.0002543 
> 0.0001265]';//values of y
>
> May I know the best way to determine dy/dx for the data set.
>
> Thank you very much and God bless you
>
> Samuel Ogbonna Enibe
> University of Nigeria, Nsukka, Nigeria
> Tel: +2348063646798
> Email: samuel.enibe at unn.edu.ng <mailto:samuel.enibe at unn.edu.ng>
> enibesam at yahoo.com <mailto:enibesam at yahoo.com>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users



---
U ovoj e-pošti nema virusa i zlonamjernih programa jer je aktivna avast! antivirusna zaštita.
http://www.avast.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20140322/526f296b/attachment.htm>


More information about the users mailing list