home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sonderh1 / flex.inc < prev    next >
Text File  |  1988-02-01  |  1KB  |  31 lines

  1. (*****************************************************************************)
  2. (*                              FLEX.INC                                     *)
  3. (*                                                                           *)
  4. (*                     Berechnung der Wendstellen von f                      *) 
  5. (*****************************************************************************)
  6.  
  7. Procedure FindFlexPoints;
  8.  
  9.    Var x,dx,xmin,xmax :Real;
  10.        found,done     :Boolean;
  11.  
  12.    Begin
  13.    GetInterval ('Wendestellenbestimmung', xmin, xmax, dx);
  14.    found := false;
  15.    x := Solve (xmin, xmax, dx, 2, done);
  16.    If done then
  17.       Repeat
  18.          If fn(x-dx,2) * fn(x+dx,2) < 0 then
  19.             If (fn(x,1) < eps) and (fn(x,1) > -eps) then
  20.                Write ('W')
  21.             else
  22.                Write ('S');
  23.          WriteLn (' (',x:m:n,', ',fn(x,0):m:n,')');
  24.          found := true;
  25.          xmin := x + dx;
  26.          x := Solve (xmin, xmax, dx, 2, done)
  27.       until not done or (x > xmax);
  28.    If not found then
  29.       WriteLn ('Keine Wendestelle gefunden!')
  30.    End;
  31.