AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

ln-Funktion

Ein Thema von Rebel · begonnen am 2. Feb 2014 · letzter Beitrag vom 5. Feb 2014
 
Rebel

Registriert seit: 10. Jan 2014
18 Beiträge
 
#11

AW: ln-Funktion

  Alt 4. Feb 2014, 17:48
Delphi-Quellcode:
procedure TForm1.FormCreate(Sender: TObject); //Koordinatensystem
var i: integer;
begin
  with image1.Canvas do
  begin
  moveto(20,220); lineto(440,220); //x-Achse
  moveto(220,5); lineto(220,420); //y-Achse
  moveto(430,215); lineto (442,220);
  lineto (430,225); //x-Pfeil
  moveto(215,15); lineto (220,5);
  lineto (225,15); //y-Pfeil
  textout(445,225,'x'); //Beschriftung x
  textout(200,0,'y'); //Beschriftung y
    for i:=-10 to 10 do
    begin
    moveto(220+50*i,215);
    lineto (220+50*i,225); //x-Einteilung
    moveto(215,220+50*i);
    lineto (225,220+50*i); //y-Einteilung
    textout(222+50*i,225,inttostr(i)); //Zahlen x-Achse
    if i <> 0 then
    textout (205,213+50*i,inttostr(-i)); //Zahlen y-Achse
    end;
  end;

procedure TForm1.Button7Click(Sender: TObject); //Logarithmusfunktion, die nicht klappt :(
var float:Double; x,y:real; i,j:integer;

begin
 Val(edit1.Text,a,f1);

begin
  float:= Ln(a);
  float := Exp(float);
  i:=20;
  while i<420 do
    begin
    i:=i+1;
    x:=(i-220)/50; //x skalieren
    y:=float; //y sklarieren //Befehl Quelle: [url]http://www.physik-multimedial.de/cvpmm/sle/trigonometrie/sinusfunktion.html[/url]
    j:=round((220-y*50)); //j berechnen
    image1.Canvas.Pixels[i,j]:=clteal; //zeichnen
    image1.Canvas.Font.Color:=clteal;
    image1.Canvas.TextOut(340,405, 'y=ln(a)');
end;
end;
end;
Ich glaube mein Befehl ist einfach falsch, aber ich weiß halt nicht, wie ich ihn richtig schreiben soll
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz