<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Utilities/

linearequation.pro

Calculate a linear equation of the type ax+by+c=0 thanks to coordinates of 2 points. comment: we can have a table with pairs of points.

toplinearequation Utilities

result = linearequation(point1, point2)

Return value

abc is a table of dimension 3, number_of_straight_line, where for each line of the table we obtain the 3 parameters a, b and c of the linear equation ax+by+c=0

Parameters

point1        in required

This is the first point of(the) straight line(s) whose we want to calculate equation(s)

point2        in required

This is the second point of(the) straight line(s) whose we want to calculate equation(s) There is 2 possibilities: 1) point is a complex or a table of complex, where each element is the coordinates of the point. 2) point is a table of real of dimension 2,number_of_straight_line. For each row of the table, we have coordinates of the point.

Examples

IDL> abc=linearequation(complex(1,2),[3,4]) IDL> print, abc[0]*1+abc[1]*2+abc[2] 0.00000

Version history

Version

$Id: linearequation.pro 136 2006-07-10 15:20:19Z pinsard $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) 10 juin 2000
Produced by IDLdoc 2.0.