Pages

Monday, December 27, 2010

Polinomial Differentiation Using JS

/**
 * This function will do polinomial differentioation.
 * 
 * @author  : irfanudin ridho
 * @email   : irfan.ub@gmail.com
 * @date    : December 28, 2010
 * @version : 1.0
 */




function Polinomial(){
    var x = new Array();
    x[0] = 1;
    var dx = 0.1;
    var y = new Array();
    var fx = 2*x[0];
    y[0] = 1;
    for(i=1;i<12;i++){
        x[i] = x[i-1]+dx;                   //1.1 - 1.2 - 1.3
        y[i]=y[i-1]+dx-fx;
       fx = 2*x[i];
    }
}
                           

No comments:

Post a Comment