Changeset 133 for trunk/SRC/Utilities/linearequation.pro
- Timestamp:
- 07/07/06 11:57:27 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Utilities/linearequation.pro
r132 r133 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME: linearequation6 5 ; 7 ; PURPOSE:calcule une equation de droite du type ax+by+c=0 a partir 8 ; des coordonnees de 2 points. Rq: on peut avoir un tableau de couple 9 ; de points. 6 ; @file_comments 7 ; Calculate a linear equation of the type ax+by+c=0 8 ; thanks to coordinates of 2 points. 9 ; comment: we can have a table with pairs of points. 10 10 ; 11 ; CATEGORY:petit truc qui peut etre utile (sans boucles, ca va de soit!) 11 ; @categories utilities 12 ; 13 ; @param point1 {in}{required} This is the first point of(the) straight 14 ; line(s) whose we want to calculate equation(s) 12 15 ; 13 ; CALLING SEQUENCE:abc=linearequation(point1, point2) 14 ; 15 ; INPUTS: point1 et point2 dont deux point de(s) la droite(s) dont on 16 ; veut calculer l(es) equations(s). 17 ; deux possibilites sont possibles: 18 ; 1) point est un complexe ou un tableau de complexes, ou chaque 19 ; element du complexe est les coordonnees du point 20 ; 2) points est un tableau de reels de dimensions 2 21 ; ,nbre_de_droite. ou pour chaque ligne du tableau on a les 22 ; coordonnees du point. 16 ; @param point2 {in}{required} This is the second point of(the) straight 17 ; line(s) whose we want to calculate equation(s) 23 18 ; 24 ; KEYWORD PARAMETERS: 19 ; There is 2 possibilities: 20 ; 1) point is a complex or a table ofcomplex, where each element is the coordinates of the point. 21 ; 2) point is a table of real of dimension 2,number_of_straight_line. 22 ; For each row of the table, we have coordinates of the point. 25 23 ; 26 ; OUTPUTS:abc c''est un tableau de dimensions 3, nbre_de_droite, ou27 ; pour chaque ligne du tableau on obtient les 3 parametres a, b, c de28 ; l'equation de la droiteax+by+c=024 ; @returns abc is a table of dimension 3, number_of_straight_line, 25 ; where for each lign of the table we obtain the 3 parameters 26 ; a, b and c of the linear equation ax+by+c=0 29 27 ; 30 ; COMMON BLOCKS: 28 ; @examples IDL> abc=linearequation(complex(1,2),[3,4]) 29 ; IDL> print, abc[0]*1+abc[1]*2+abc[2] 30 ; 0.00000 31 31 ; 32 ; SIDE EFFECTS: 32 ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) 33 ; 10 juin 2000 33 34 ; 34 ; RESTRICTIONS:35 ; @version $Id$ 35 36 ; 36 ; EXAMPLE:37 ; IDL> abc=linearequation(complex(1,2),[3,4])38 ; IDL> print, abc[0]*1+abc[1]*2+abc[2]39 ; 0.0000040 ;41 ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)42 ; 10 juin 200043 37 ;- 44 38 ;------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.