//defining a derivative of data curve fitting function
public class f5a extends f_xj
{ public int n,degree;
 double xy[][];
 //n derivative with respect to first or second variable
 // degree: degree of curve fitting

 public f5a(double xyi[][],int degreei,int ni){n=ni;xy=xyi;degree=degreei;}
public double func(double x[]) 
{ f2x ff=new f2x(xy,degree);
 double fx=ff.dfunc(x,n);
 return fx; 
}}