Slot points on schedule



  • We need to build a schedule y=log7(итьxить) Accordingly, there is a break point at x=0. In this case, Delphi (as did Exel) accepts, instead of zero, a very small number expressed through the Expont. Because of that, x=0, y=17.532 I'm trying to build a graph and make points of rupture, and I'm using 2 series. But the problem is, under certain x, the schedule is being built normally, but under others, either it's unsatisfactory, or the other way around, it's building a line to read the code. I'm writing like this, and it's not clear that:

    begin
    Series1.Clear;
    series2.Clear;
    StringGrid1.Cells[0,0]:='X';
    StringGrid1.Cells[1,0]:='Y';
    xn:=StrToFloat(Edit2.Text);
    xk:=StrToFloat(Edit3.Text);
    dx:=StrToFloat(Edit4.Text);
    x:=xn;
    i:=0;
    repeat
    y:=LogN(7,ABS(x));
    i:=i+1;
    StringGrid1.Cells[0,i]:= FormatFloat('0.000',x);
    StringGrid1.Cells[1,i]:= FormatFloat('0.000',y);
    StringGrid1.RowCount:=i;
    if (x<0) then
    series1.AddXY(x,y);
    if (x>(abs(dx))) then
    series2.AddXY(x,y);
    x:=x+dx;
    until x>xk+dx;
    Chart1.visible:=true;
    StringGrid1.visible:=true;
    end;
    

    введите сюда описание изображения

    введите сюда описание изображения



    1. In the area of the rupture point, dx is reduced (more than the first output module, the smaller it shall be).
    2. Control value y:

      if y < -10 then y := -10;
      

      or

      if y < -10 then continue;
      

      Just don't forget the drilling. x

    3. Change if(x > (abs(dx))) thenif(x > 0) then




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2