Example of Chebyshev polynomials using TFormula pre-defined definitions of chebyshev polynomials.
void ChebyshevPol() {
auto legend =
new TLegend(0.88,0.4,1.,1.);
int colors[] = {
kRed,
kRed+3,
kMagenta,
kMagenta+3,
kBlue,
kBlue+3,
kCyan+3,
kGreen,
kGreen+3,
kYellow,
kOrange };
for (int degree=0; degree <=10; ++degree) {
f1->SetParameter(degree,1);
TString opt = (degree == 0) ?
"" :
"same";
f1->SetTitle(
"Chebyshev Polynomial");
}
legend->Draw();
}
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
- Author
- Lorenzo Moneta
Definition in file ChebyshevPol.C.