[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
9.7.6 Envelop sample
C++ code
mglData a(1000); a.Fill("exp(-8*x^2)*sin(10*pi*x)", gr->Min, gr->Max); gr->Plot(a, "b"); a.Envelop('x'); gr->Plot(a, "r"); gr->Axis();
MGL code
new a 1000 fill a 'exp(-8*x^2)*sin(10*pi*x)' plot a 'b' envelop a plot a 'r' axis
Pure C code
HMDT a = mgl_create_data_size(1000,1,1); mgl_data_fill_eq(gr,a, "exp(-8*x^2)*sin(10*pi*x)", 0,0); mgl_plot(gr,a,"b"); mgl_data_envelop(a,'x'); mgl_plot(gr,a,"r"); mgl_axis(gr,"xyz");
Fortran code
integer a, mgl_create_data_size a = mgl_create_data_size(1000,1,1) call mgl_data_fill_eq(gr,a, 'exp(-8*x^2)*sin(10*pi*x)', 0,0) call mgl_plot(gr,a,'b') call mgl_data_envelop(a,'x') call mgl_plot(gr,a,'r') call mgl_axis(gr,'xyz')
Python
a = mglData(1000); gr.Fill(a, "exp(-8*x^2)*sin(10*pi*x)"); gr.Plot(a,"b"); a.Envelop("x"); gr.Plot(a,"r"); gr.Axis();