- scl.jdg [c+]
[..] La fonction [jdg] polychscl
Code
int polych_jdg(){
scltracefa(§, ƒ, ∅);
scltracefc("scl-%s (%s) : %s\n\n", sclver(), sclsec(), temps_char(0));
int xn=1001, xi;double *x=newtablin(xn, -2, 2);
double *y_0=new double[xn], *y_1=new double[xn], *y_2=new double[xn],
*y_3=new double[xn], *y_4=new double[xn], *y_5=new double[xn];
int n_0=0, n_1=1, n_2=2, n_3=3, n_4=4, n_5=5;
for(xi=0;xi<xn;xi++){
y_0[xi] = pchebycev(n_0, x[xi]);
y_1[xi] = pchebycev(n_1, x[xi]);
y_2[xi] = pchebycev(n_2, x[xi]);
y_3[xi] = pchebycev(n_3, x[xi]);
y_4[xi] = pchebycev(n_4, x[xi]);
y_5[xi] = pchebycev(n_5, x[xi]);
}
scl::string_c imgname=scl::string_c(ƒ)+".pdf",
imgpath="./srt/"+imgname;
graf_dis(imgpath.c_str(), xn, x, y_0,
"curve", xn, x, y_1, "curve", xn, x, y_2, "curve", xn, x, y_3,
"curve", xn, x, y_4, "curve", xn, x, y_5,
"grid", "on",
"title", "Chebycev's polynomials (first kind)",
"subtitlex", imgname.c_str(), /*"subtitle", subtitle.c_str(),*/
"linespec", ".-h;-t;:l;--c;--t;-.i", "linespeca", "-a",
"background-color", "w",
"aymin", -2, "aymax", 2,
"legend", "n=0;n=1;n=2;n=3;n=4;n=5", "legcorn", "ura",
/*"xlabel", "[rad]",*/ ∅);
scltracefe(§, ƒ, ∅);
return 0;
}
/* ƒ décorée par
le 07-03-2026 09:53:09 */
Sortie
[>..\xpl\src\scl.jdg.cpp.polych_jdg]
scl-26.03 (gwin64) : 07-03-2026 09:53:09
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<< END OF DISLIN / VERSION 11.3.2 <<
<< Date : 07.03.2026 Time : 09:53:09 Pageformat: DA4L <<
<< Vectors : 3428 Warnings: 0 Fileformat: PDF <<
<< Metafile: ./srt/polych_jdg.pdf <<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
[<..\xpl\src\scl.jdg.cpp.polych_jdg]
