ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
formula1.C File Reference

Display interpreted functions. More...

Go to the source code of this file.

Detailed Description

Display interpreted functions.

pict1_formula1.C.png
void formula1() {
TCanvas *c1 = new TCanvas("c1","Example with Formula",200,10,700,500);
//
// We create a formula object and compute the value of this formula
// for two different values of the x variable.
//
auto form1 = new TFormula("form1","sqrt(abs(x))");
form1->Eval(2);
form1->Eval(-45);
//
// Create a one dimensional function and draw it
//
auto fun1 = new TF1("fun1","abs(sin(x)/x)",0,10);
c1->SetGridx();
c1->SetGridy();
fun1->Draw();
c1->Update();
//
// Before leaving this demo, we print the list of objects known to ROOT
//
}
Author
Rene Brun

Definition in file formula1.C.