Arkadaşlar merhaba
Regression kodu yazdım ve bu koda gore verilen noktalara bir polinom fit ediyorum
PHP Code:
fitPolynom(minloc.x,minloc.x+1,minloc.x-1,minx,value,value2);


Şimdi bu elde ettiğim polinomun/foknsiyonun turevini almam lazım ama benim yazdığım turev alma kodu tam calışmıyor sanırım
PHP Code:
#include
using namespace std;
typedef double (* vFunctionCall)(int args);
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
double f(int x)

double turev(vFunctionCall g,int x )



int main(int argc, char** argv)


Bir de benim yazdığım bu kod benim yukarıdaki fitpolynom fonksiyonu icin uygun değil sanırım
Bir de şu kod var :
PHP Code:
void firstDerivative(float *data, float *firstderv, int nx)

firstderv[nx-1] = data[nx-1]-data[nx-2];
}


ama bnu da kodumla birleştiremedim yardım eder misiniz?
__________________