home *** CD-ROM | disk | FTP | other *** search
- (*****************************************************************************)
- (* *)
- (* --- EXTREME.INC --- *)
- (* *)
- (* Unterprogramm-Modul zur Extremwertberechung *)
- (* *)
- (*****************************************************************************)
-
-
- Procedure FindExtremeValues;
-
-
- Var x,dx,
- xmin,xmax :Real;
- found,
- Success :Boolean;
-
- Begin
- ClrScr;
- WriteLn ('Extremwertbestimmung'); WriteLn;
- Write ('im Bereich von xmin='); Read (xmin);
- Write (' bis xmax='); Read (xmax);
- Write (' mit Schrittweite dx='); ReadLn (dx);
- WriteLn; WriteLn;
- found := false;
- x := Solve (xmin,xmax,dx,1,Success);
- If Success then
- Repeat
- If (fn(x-dx,1) > 0) and (fn(x+dx,1) < 0) then
- Write ('H')
- else
- if (fn(x-dx,1) < 0) and (fn(x+dx,1) > 0) then
- Write ('T')
- else
- Write ('S');
- WriteLn (' (',x:m:n,', ',fn(x,0):m:n,')');
- found := true;
- xmin := x + dx;
- x := Solve (xmin,xmax,dx,1,Success)
- until not Success or (x>xmax);
- if not found then WriteLn ('Keine Extremwerte gefunden!')
- End;