Autor Beitrag
eniac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: So 05.12.04 12:46 
Hallo Leute,


ich hab ein einfaches Programm geschrieben, dass den Funktionsgraph zu einer Funktion anzeigt. Immer wenn ich die Funktionsgleichung ändern will, muss ich aus dem Programm rausgehen und die entsprechende Zeile im Sourcecode ändern.
Mein Ziel ist es eine Edit-Komponente zu nutzen, in die ich dann die Gleichung direkt eingeben kann, während mein Programm läuft!!!
Mein Problem: Ich hab keine Ahnung wie :(

Danke für Bemühungen jedweder Art schon mal im Vorraus :!:


Gruß, eniac


Moderiert von user profile iconChristian S.: Topic aus CLX / Delphi Language (Object-Pascal) verschoben am So 05.12.2004 um 12:49
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: So 05.12.04 12:59 
Stichwort "Math Parser". Such mal danach. Es gibt mindestens 3 vollständige Quelltexte hier (Open Source Units?).

Gruß,
Jörg

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: So 05.12.04 12:59 
Hallo,

für sowas brauchst Du einen mathematischen Parser wie Du ihn in der Open Source Units Sparte hier im Forum finden kannst:
Parser für mathematische Ausdrücke

Gruß,

raziel

_________________
JSXGraph
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: So 05.12.04 13:31 
hm,

erst mal danke für die Tipps.
Aber die Parser die ich in diesem Forum gefunden habe, verarbeiten nur mathematische Terme. Ich brauche einen Algorithmus, der gleichzeitig auch Variablen erkennt (z.B. x) und auf Parameter eingehen kann (z.B. a).
Kennt ihr dazu vielleicht nützliche Links oder Quellcodes :?:
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: So 05.12.04 13:35 
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: So 05.12.04 13:38 
eniac hat folgendes geschrieben:
Aber die Parser die ich in diesem Forum gefunden habe, verarbeiten nur mathematische Terme. Ich brauche einen Algorithmus, der gleichzeitig auch Variablen erkennt (z.B. x) und auf Parameter eingehen kann (z.B. a).

Is klar. Du musst natürlich noch vor der Berechnung zu jedem Punkt Variablen in deinem Term durch Zahlen ersetzen (Definitionsbereich, Parameter). Der Parser rechnet dir dann deine Funktion aus. Ggf. kannst du das mit dem Ersetzen auch in den Parser einbauen. Ist nicht allzu schwer.

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: So 05.12.04 15:15 
THX, ich hab's jetzt. :D