home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / 1987 / 03 / flex.inc < prev    next >
Encoding:
Text File  |  1987-02-03  |  1.4 KB  |  41 lines

  1. (*****************************************************************************)
  2. (*                                                                           *)
  3. (*                            ---  FLEX.INC  ---                             *)
  4. (*                                                                           *)
  5. (*               Unterprogramm-Modul zur Wendestellenberechnung              *)
  6. (*                                                                           *)
  7. (*****************************************************************************)
  8.  
  9.  
  10. Procedure FindFlexPoints;
  11.  
  12.  
  13.    Var x,dx,
  14.        xmin,xmax :Real;
  15.        found,
  16.        Success   :Boolean;
  17.  
  18.    Begin
  19.    ClrScr;
  20.    WriteLn ('Wendestellenbestimmung'); WriteLn;
  21.    Write ('im Bereich von xmin='); Read (xmin);
  22.    Write (' bis xmax='); Read (xmax);
  23.    Write (' mit Schrittweite dx='); ReadLn (dx);
  24.    WriteLn; WriteLn;
  25.    found := false;
  26.    x := Solve (xmin,xmax,dx,2,Success);
  27.    If Success then
  28.       Repeat
  29.          If fn(x-dx,2) * fn(x+dx,2) < 0 then
  30.             If (fn(x,1) < eps) and (fn(x,1) > -eps) then
  31.                Write ('W')
  32.             else
  33.                Write ('S');
  34.          WriteLn (' (',x:m:n,', ',fn(x,0):m:n,')');
  35.          found := true;
  36.          xmin := x + dx;
  37.          x := Solve (xmin,xmax,dx,2,Success)
  38.       until not Success or (x>xmax);
  39.    If not found then WriteLn ('Keine Wendestelle gefunden!')
  40.    End;
  41.