John Cagnol


Paris, France

Introduction au Calcul Scientifique
ESI CS 1402 - Printemps 2010

Discretisation d'unne fonction

> L:=12.0;
Nx:=60;
hx:=L/Nx;
12.0
60
.2000000000
> for i from 0 to Nx do
 u[i,0] := (sin(i*hx)+1)/2;
end do;
.5000000000
.5993346654
.6947091712
.7823212367
.8586780454
.9207354924
.9660195430
.9927248650
.9997868015
.9869238154
.9546487134
.9042482019
.8377315903
.7577506859
.6674940751
.5705600040
.4708129283
.3722294490
.2787397784
.1940710546
.1215987524
0.642121138e-1
0.241989630e-1
0.31544982e-2
0.19176956e-2
0.205378626e-1
0.582726722e-1
.1136177562
.1843666810
.2676989103
.3602922509
.4584552986
.5582746024
.6557706818
.7470566756
.8284932994
.8968339319
.9493540479
.9839598360
.9992716727
.9946791233
.9703652784
.9272994540
.8671985490
.7924585964
.7060592426
.6114449570
.5123877127
.4128366094
.3167604354
.2279894446
.1500626562
0.860867654e-1
0.386122892e-1
0.95318850e-2
0.48967e-5
0.104111354e-1
0.403357372e-1
0.885857025e-1
.1532374576
.2317135410
> with(plots);
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
[animate, animate3d, animatecurve, arrow, changecoords, complexplot, complexplot3d, conformal, conformal3d, contourplot, contourplot3d, coordplot, coordplot3d, densityplot, display, fieldplot, fieldpl...
> pointplot({seq([i*hx,u[i,0]],i=0..Nx)});
Plot_2d