void anpassung() { TH1* h = new TH1F( "h", "Histogramm", 100, 0, 10 ); TF1* f1 = new TF1( "f1", "exp(-x)*x", 0, 10 ); h->FillRandom( "f1", 1000 ); h->SetMarkerStyle( 20 ); h->SetMarkerSize( 0.5 ); TF1* ffit = new TF1( "ffit", "[0]*exp(-[1]*x)*x", 0, 10 ); ffit->SetParameters( 10, 1 ); h->Fit("ffit","","e"); }