859
883
<term><synopsis>a>=b</synopsis></term>
861
<para>Opérateur supérieur ou égal, renvoie <constant>true</constant> si <varname>a</varname> est supérieur ou égal à <varname>b</varname> sinon renvoie <constant>false</constant>.</para>
886
Greater than or equal operator,
887
returns <constant>true</constant> if <varname>a</varname> is
888
greater than or equal to
889
<varname>b</varname> else returns <constant>false</constant>.
890
These can be chained as in <userinput>a >= b >= c</userinput>
891
(can also be combine with the greater than operator).
897
<term><synopsis>a<b</synopsis></term>
901
returns <constant>true</constant> if <varname>a</varname> is
902
less than or equal to
903
<varname>b</varname> else returns <constant>false</constant>.
904
These can be chained as in <userinput>a < b < c</userinput>
905
(can also be combine with the less than or equal to operator).
912
<term><synopsis>a>b</synopsis></term>
915
Greater than operator,
916
returns <constant>true</constant> if <varname>a</varname> is
917
greater than or equal to
918
<varname>b</varname> else returns <constant>false</constant>.
919
These can be chained as in <userinput>a > b > c</userinput>
920
(can also be combine with the greater than or equal to operator).
1299
1381
</programlisting> renvoie une fonction qui, lorsqu'elle est appelée, ajoute 5 à ses arguments. La copie locale de <varname>k</varname> a été créée lorsque la fonction a été définie.</para>
1300
<para>Lorsque vous désirez que la fonction n'ait pas de dictionnaire privé alors mettez des crochets carrés vides après la liste d'arguments. Alors aucun dictionnaire privé n'est créé. Ce méchanisme est utile pour améliorer l'efficacité des fonctions qui n'ont pas besoin de dictionnaire privé, ou encore si vous voulez que la fonction utilise les variables dans leur état au moment où elle est appelée. Par exemple, supposons que vous vouliez que la fonction renvoyée par <function>f</function> recherche la valeur de <varname>k</varname> dans le niveau supérieur bien qu'il y ait une variable locale portant le même nom pendant la définition. Le code suivant <programlisting>function f() = (
1383
When you want the function to not have any private dictionary
1384
then put empty square brackets after the argument list. Then
1385
no private dictionary will be created at all. Doing this is
1386
good to increase efficiency when a private dictionary is not
1387
needed or when you want the function to lookup all variables
1388
as it sees them when called. For example suppose you want
1389
the function returned from <function>f</function> to see
1390
the value of <varname>k</varname> from the toplevel despite
1391
there being a local variable of the same name during definition.
1393
<programlisting>function f() = (
1302
1395
function r(x) [] = (x+k);
4827
4964
</varlistentry>
4966
<varlistentry id="gel-function-BesselJ0">
4967
<term>BesselJ0</term>
4969
<synopsis>BesselJ0 (x)</synopsis>
4970
<para>Bessel function of the first kind of order 0. Only implemented for real numbers.</para>
4973
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
4978
<varlistentry id="gel-function-BesselJ1">
4979
<term>BesselJ1</term>
4981
<synopsis>BesselJ1 (x)</synopsis>
4982
<para>Bessel function of the first kind of order 1. Only implemented for real numbers.</para>
4985
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
4990
<varlistentry id="gel-function-BesselJn">
4991
<term>BesselJn</term>
4993
<synopsis>BesselJn (n,x)</synopsis>
4994
<para>Bessel function of the first kind of order <varname>n</varname>. Only implemented for real numbers.</para>
4997
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
5002
<varlistentry id="gel-function-BesselY0">
5003
<term>BesselY0</term>
5005
<synopsis>BesselY0 (x)</synopsis>
5006
<para>Bessel function of the second kind of order 0. Only implemented for real numbers.</para>
5009
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
5014
<varlistentry id="gel-function-BesselY1">
5015
<term>BesselY1</term>
5017
<synopsis>BesselY1 (x)</synopsis>
5018
<para>Bessel function of the second kind of order 1. Only implemented for real numbers.</para>
5021
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
5026
<varlistentry id="gel-function-BesselYn">
5027
<term>BesselYn</term>
5029
<synopsis>BesselYn (n,x)</synopsis>
5030
<para>Bessel function of the second kind of order <varname>n</varname>. Only implemented for real numbers.</para>
5033
<ulink url="http://en.wikipedia.org/wiki/Bessel_functions">Wikipedia</ulink> for more information.
4829
5038
<varlistentry id="gel-function-DirichletKernel">
4830
5039
<term>DirichletKernel</term>
5479
5704
<sect1 id="genius-gel-function-list-plotting">
5480
5705
<title>Tracé de graphiques</title>
5707
<varlistentry id="gel-function-ExportPlot">
5708
<term>ExportPlot</term>
5710
<synopsis>ExportPlot (file,type)</synopsis>
5711
<synopsis>ExportPlot (file)</synopsis>
5713
Export the contents of the plotting window to a file.
5714
The type is a string that specifies the file type to
5715
use, "png", "eps", or "ps". If the type is not
5716
specified, then it is taken to be the extension, in
5717
which case the extension must be ".png", ".eps", or ".ps".
5720
Note that files are overwritten without asking.
5723
On successful export, true is returned. Otherwise
5724
error is printed and exception is raised.
5728
<screen><prompt>genius></prompt> <userinput>ExportPlot("file.png")</userinput>
5729
<prompt>genius></prompt> <userinput>ExportPlot("/directory/file","eps")</userinput>
5482
5735
<varlistentry id="gel-function-LinePlot">
5483
5736
<term>LinePlot</term>
5506
5759
<synopsis>LinePlotDrawLine (x1,y1,x2,y2,...)</synopsis>
5507
5760
<synopsis>LinePlotDrawLine (v,...)</synopsis>
5508
<para>Trace une ligne du point <varname>x1</varname>, <varname>y1</varname> au point <varname>x2</varname>, <varname>y2</varname>. Les points <varname>x1</varname>, <varname>y1</varname>, <varname>x2</varname>, <varname>y2</varname> peuvent être remplacés par une matrice <varname>n</varname> par 2 pour tracer une polyligne.</para>
5762
Draw a line from <varname>x1</varname>,<varname>y1</varname> to
5763
<varname>x2</varname>,<varname>y2</varname>.
5764
<varname>x1</varname>,<varname>y1</varname>,
5765
<varname>x2</varname>,<varname>y2</varname> can be replaced by an
5766
<varname>n</varname> by 2 matrix for a longer polyline.
5509
5768
<para>Des paramètres supplémentaires peuvent être ajoutés pour spécifier la couleur de la ligne, des flèches et la zone de tracé. Vous pouvez faire cela en ajoutant une chaîne <userinput>"color"</userinput>, <userinput>"thickness"</userinput>, <userinput>"window"</userinput> ou <userinput>"arrow"</userinput> et ensuite, respectivement, la chaîne de couleur (en anglais), l'épaisseur sous la forme d'un entier, la fenêtre sous la forme d'un vecteur à 4 éléments et pour la flèche soit <userinput>"origin"</userinput>, <userinput>"end"</userinput>, <userinput>"both"</userinput> ou <userinput>"none"</userinput>. Pour <userinput>"window"</userinput>, vous pouvez indiquer <userinput>"fit"</userinput> plutôt qu'un vecteur et dans ce cas, l'intervalle x est défini de manière précise et l'intervalle y est défini avec une bordure de cinq pour cent autour de la ligne. Finalement, la légende peut être spécifiée en ajoutant <userinput>"legend"</userinput> et la chaîne contenant la légende.</para>
5510
5769
<para>Exemples : <screen><prompt>genius></prompt> <userinput>LinePlotDrawLine(0,0,1,1,"color","blue","thickness",3)</userinput>
5511
5770
<prompt>genius></prompt> <userinput>LinePlotDrawLine([0,0;1,-1;-1,-1])</userinput>
5573
5832
<synopsis>SurfacePlot (fonc)</synopsis>
5574
5833
<synopsis>SurfacePlot (fonc,x1,x2,y1,y2,z1,z2)</synopsis>
5834
<synopsis>SurfacePlot (func,[x1,x2,y1,y2,z1,z2])</synopsis>
5575
5835
<para>Trace une surface, dont la fonction prend comme arguments deux nombres ou bien un nombre complexe. En premier vient la fonction puis en option les limites sous la forme <varname>x1</varname>, <varname>x2</varname>, <varname>y1</varname>, <varname>y2</varname>, <varname>z1</varname>, <varname>z2</varname>. Si les limites ne sont pas indiquées alors les limites actuellement utilisées s'appliquent (consultez <link linkend="gel-function-LinePlotWindow"><function>LinePlotWindow</function></link>). Genius ne peut tracer qu'une seule surface à la fois.</para>
5576
5836
<para>Exemples : <screen><prompt>genius></prompt> <userinput>SurfacePlot(|sin|,-1,1,-1,1,0,1.5)</userinput>
5577
5837
<prompt>genius></prompt> <userinput>SurfacePlot(`(x,y)=x^2+y,-1,1,-1,1,-2,2)</userinput>
5581
5841
</varlistentry>
5843
<varlistentry id="gel-function-SurfacePlotData">
5844
<term>SurfacePlotData</term>
5846
<synopsis>SurfacePlotData (data)</synopsis>
5847
<synopsis>SurfacePlotData (data,label)</synopsis>
5848
<synopsis>SurfacePlotData (data,x1,x2,y1,y2,z1,z2)</synopsis>
5849
<synopsis>SurfacePlotData (data,label,x1,x2,y1,y2,z1,z2)</synopsis>
5850
<synopsis>SurfacePlotData (data,[x1,x2,y1,y2,z1,z2])</synopsis>
5851
<synopsis>SurfacePlotData (data,label,[x1,x2,y1,y2,z1,z2])</synopsis>
5853
Plot a surface from data. The data is an n by 3 matrix whose
5854
rows are the x, y and z coordinates. The data can also be
5855
simply a vector whose length is a multiple of 3 and so
5856
contains the tripples of x, y, z. The data should contain at
5860
Optionally we can give the label and also optionally the
5861
limits. If limits are not given, they are computed from
5862
the data, <link linkend="gel-function-SurfacePlotWindow"><function>SurfacePlotWindow</function></link>
5863
is not used, if you want to use it, pass it in explicitly.
5864
If label is not given then empty label is used.
5868
<screen><prompt>genius></prompt> <userinput>SurfacePlotData([0,0,0;1,0,1;0,1,1;1,1,3])</userinput>
5869
<prompt>genius></prompt> <userinput>SurfacePlotData(data,"My data")</userinput>
5870
<prompt>genius></prompt> <userinput>SurfacePlotData(data,-1,1,-1,1,0,10)</userinput>
5871
<prompt>genius></prompt> <userinput>SurfacePlotData(data,SurfacePlotWindow)</userinput>
5875
Here's an example of how to plot in polar coordinates,
5876
in particular how to plot the function
5877
<userinput>-r^2 * theta</userinput>:
5878
<screen><prompt>genius></prompt> <userinput>d:=null; for r=0 to 1 by 0.1 do for theta=0 to 2*pi by pi/5 do d=[d;[r*cos(theta),r*sin(theta),-r^2*theta]];</userinput>
5879
<prompt>genius></prompt> <userinput>SurfacePlotData(d)</userinput>
5885
<varlistentry id="gel-function-SurfacePlotDataGrid">
5886
<term>SurfacePlotDataGrid</term>
5888
<synopsis>SurfacePlotDataGrid (data,[x1,x2,y1,y2])</synopsis>
5889
<synopsis>SurfacePlotDataGrid (data,[x1,x2,y1,y2,z1,z2])</synopsis>
5890
<synopsis>SurfacePlotDataGrid (data,[x1,x2,y1,y2],label)</synopsis>
5891
<synopsis>SurfacePlotDataGrid (data,[x1,x2,y1,y2,z1,z2],label)</synopsis>
5893
Plot a surface from regular rectangular data.
5894
The data is given in a n by m matrix where the rows are the
5895
x coordinate and the columns are the y coordinate.
5896
The x coordinate is divided into equal n-1 subintervals
5897
and y coordinate is divided into equal m-1 subintervals.
5898
The limits <varname>x1</varname> and <varname>x2</varname>
5899
give the interval on the x-axis that we use, and
5900
the limits <varname>y1</varname> and <varname>y2</varname>
5901
give the interval on the y-axis that we use.
5902
If the limits <varname>z1</varname> and <varname>z2</varname>
5903
are not given they are computed from the data (to be
5904
the extreme values from the data).
5907
Optionally we can give the label, if label is not given then
5908
empty label is used.
5912
<screen><prompt>genius></prompt> <userinput>SurfacePlotDataGrid([1,2;3,4],[0,1,0,1])</userinput>
5913
<prompt>genius></prompt> <userinput>SurfacePlotDataGrid(data,[-1,1,-1,1],"My data")</userinput>
5914
<prompt>genius></prompt> <userinput>d:=null; for i=1 to 20 do for j=1 to 10 d@(i,j) = (0.1*i-1)^2-(0.1*j)^2;</userinput>
5915
<prompt>genius></prompt> <userinput>SurfacePlotDataGrid(d,[-1,1,0,1],"half a saddle")</userinput>
5583
5921
<varlistentry id="gel-function-VectorfieldClearSolutions">
5584
5922
<term>VectorfieldClearSolutions</term>