Autor Beitrag
XZeranski
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 29.03.03 19:49 
Hallo, ich möchte eine Programm gestalten das eine mathematische Formel einließt (zunächst erstmal lineare und quadratische Gleichungen) und dann den zugehörigen Graph der Funktion darstellt.

Ich hatte schonmal den Link zu einem Parser bekommen mit dem man Formeln in einem String-Feld einlesen konnte um damit zu rechnen.
Da das für mich als Neuling aber viel zu kompliziert ist habe ich erstmal nur mit der einfachen Formel y = a*x +,-,*,/ b angefangen.
Ich habe das Formular so aufgebaut das man aus einer Combobox die Rechenoperation +,-,* oder / auswählen konnte. Mittlerweile hab ich es auch geschafft für die lineare und quadratische Funktion den Graph zeichnen zu lassen.

Das einzige was nun halt stört ist, das es immer nur auf eine lineare Funktion mit 2 Termen beschränkt ist.
Ich möchte aber das man eine etwas größere Auswahl an Funktionen hat, also z.b. auch lineare Fkt. kombiniert mit Potenzfunktionen etc.

Ich könnte jetzt natürlich immer wieder ComboBoxen einfügen um eine große Variabilität zu erzeugen, aber das würde dann sehr unübersichtlich werden und ist am Ende dann doch noch beschränkt. Da muss es doch sicher noch eine andere Möglichkeit geben... leider fällt mir keine ein.

Habt ihr vielleicht eine Idee?

Thx!
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Sa 29.03.03 19:54 
Du hast doch selbst gesagt, Du hast schonmal den Link zu einem Parser bekommen, also warum verwendest Du den nicht, soweit ich gesehen hab, kann der alles, was Du brauchst. Und wenn Du ein neuling bist, dann ist das Parsen von Strings wohl ziemlich schwierig für Dich, also warum nimmste den Code dort nicht und versuchst nicht das Rad neu zu erfinden?
XZeranski Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 29.03.03 19:58 
Ich möchte mein Programm dann aber auch erläutern können, und den sehr komplizierten Parser verstehe ich leider überhaupt nicht.
mars
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 238

Debian Woody, Win 2000, Win XP
D7 Ent, Kylix 3
BeitragVerfasst: Sa 29.03.03 20:17 
Von welchem Parser sprecht ihr eigentlich?

Ich hätte jedenfalls Interesse daran...
XZeranski Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38



BeitragVerfasst: Sa 29.03.03 20:25 
mars
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 238

Debian Woody, Win 2000, Win XP
D7 Ent, Kylix 3
BeitragVerfasst: Sa 29.03.03 20:26 
Danke dir.