Autor Beitrag
!TNT!
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WIN XP
Delphi 6
BeitragVerfasst: So 26.02.06 15:21 
Hey Jungs und Mädels!
ich hab ein prob, und zwar muss ich ein programm schreiben, wo ich NST's berechnen muss, ich aber kein plan davon hab! könnt ihr mir da weiterhelfen? vielleicht hat der ein oder andere solch ein prog schonmal geschrieben?
Wenn jemand ideen hat, schreibt mir bitte entweder im forum, oder auf meine mail.add!
danke, cu
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: So 26.02.06 15:23 
Hallo!

Schreiben wird Dir Dein Programm hier niemand. Du solltest schon selbst ein wenig Mühe hinein stecken, dann werden wir Dir helfen, wenn's hakt.

Also:
Welche Ideen hast Du zu dem Problem? Ist die Mathematik bei der Sache klar, oder hakt es dort bereits?

Grüße
Christian

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: So 26.02.06 15:24 
Kommt drauf an.
Kannst du die Funktion im QT integrieren oder soll der User diese einfach Eingeben können?
Falls ja, musst du die eingegebene Funktion parsen und dann einfach die Parameter m und c (in der Form f(x)=mx + c) auslesen. dann ist x=-c/m.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
!TNT! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WIN XP
Delphi 6
BeitragVerfasst: Mo 27.02.06 15:47 
also, die mathematik is klar, damit hab ich kein prob und die deklarationen sind mir auch bekannt, nur wie ich fortfahre weiß ich noch nicht!

also, die funktion soll bereits vorhanden sein, eingeben soll ich nur m und c! umd dann mit y=0 auf NST zu kommen!



Moderiert von user profile iconChristian S.: Beiträge zusammengefasst
Mr.AI
Hält's aus hier
Beiträge: 3

WIN XP

BeitragVerfasst: Mo 27.02.06 15:58 
Hast du die Oberfläche schon und die Werte einlesen lassen?
AutopilotON
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win 98,ME,XP SP2,Suse 10.0
D6, TurboDelphi 2006
BeitragVerfasst: Mo 27.02.06 16:05 
JayEff hat das ganze doch schon beschrieben.
Du nimmst die allgemeine formel und stellts sie mit y=0 nach x um.(x=-c/m)
das brauchts du dann nur noch in deinem quellcode schreiben.
bsp:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
function NST(c,m:integer):real;
begin
 result:=-c/m;
end;


und abrufen machste dann so:
ausblenden Delphi-Quelltext
1:
Nullstelle:=FloatToStr(NST(StrToInt(edit1.Text),StrToInt(edit2.Text)));					



EDIT: upsa (Achtung!) Nullstelle ist hier string, deshalb FloatToStr
!TNT! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

WIN XP
Delphi 6
BeitragVerfasst: Di 28.02.06 15:51 
jo, eigentlich weiß ich nich, warum ich gefragt hab, denn so weit war ich auch schon
lol, danke jungs!
cu