pointer to real function

From: Marc Mueller (mmueller@wiwi.uni-bielefeld.de)
Date: Mon Jul 21 1997 - 17:21:21 MEST


Hi,
I can't use the pointer to a real function in class TF2.
There occurs always the report
*ERROR 26 : 
 Unknown name : "dmodel"
but the function dmodel is correct defined. 
Who can give me support?

Thanks in advance,
Marc Mueller

Double_t dmodel(Double_t *x,Double_t *par)
{
	Double_t A=par[0]; 
	Double_t B=par[1]; 
	Double_t Lmax=par[2]; 
	Double_t g=par[3]; 
	Double_t c=par[4]; 
	Double_t tax=par[5]; 
	Double_t M=par[6]; 
	Double_t p=x[0];
	Double_t w=x[1];
	Double_t Y,Ymax,YS,YD;
	Ymax=(A/B)*pow(Lmax,B);
	YS=(A/B)*pow((w/(A*p)),(B/(B-1)));
	YD=((M/p)+g)/(1-c*(1-tax));	
	Y=Ymax;
	if(Y>YS) Y=YS;
	if(Y>YD) Y=YD;
	return Y;
} 
void bo()
{
   gROOT->Reset();
   Double_t x[2];
   Double_t params[7];
   params[0]=1.0; // A
   params[1]=0.5; // B
   params[2]=16;  // Lmax
   params[3]=1.5; // g
   params[4]=0.5; // c
   params[5]=0.25;// tax
   params[6]=1.0; // M
   c1 = new TCanvas("Y_p_w","Y_p_w Surface",200,100,600,500);
   TF2 *f2 = new TF2("dm",dmodel,7);
   f2->InitArgs(x,params);
   f2->SetRange(0.1,0.1,1,1);
   f2->Draw("surf2");
}



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET