y[i] = double (Expression(x) ;
even if Expression is written as if it were Java code - e.g. f(x) = x ^2^ being written as f(x) = x*x ; So we need some means of parsing the string expression for f(x) extracted from the GUI and making it comprehensible and calculable within the Function class. Any ideas on this ? Edited by: KonTiki on 13-Mar-2013 10:50 Edited by: KonTiki on 13-Mar-2013 10:51 Edited by: KonTiki on 13-Mar-2013 10:52
KonTiki wrote:You already have the idea. You need to parse a text something representing a function. I'd be all over Google searching for a library (unless you're planning to write the parser yourself, which is probably beyond your skills(?)).
So we need some means of parsing the string expression for f(x) extracted from the GUI and making it comprehensible and calculable within the Function class.
Any ideas on this ?
KonTiki wrote:Well, I'd be seriously amazed if there didn't exist useful libraries already. JFreeChart was suggested, but you might need a separate library for the expression parsing and the plotting.
I've already looked through Google but saw nothing really useful.
While it's surprising that Java aficionados - many of whom must have some use for data plotting - haven't already produced some classes for this task, it may well be a boon to those of us needing more practice.Some casual Googling turned up plenty of activity on plotting libraries, you just have to weed out the outdated and useless ones.