From: Ethan M. <merritt@u.washington.edu> - 2008-03-14 19:16:47
|
On Friday 14 March 2008, Brouard Nicolas wrote: > Le vendredi 14 mars 2008 à 17:42 +0100, Juergen Wieferink a écrit : > > Hi, > > > > > gnuplot> alpha="3.51e-5" > > > gnuplot> beta="0.09400" > > > gnuplot> evie(alpha,beta)= `echo 90.0000 @alpha 0.00000 @beta > > > 0.10000 1|./eviegompertz` gnuplot>print evie(alpha,beta) > > > 4.230246 > > > > > > where eviegompertz is a private C program which can't be simulated in > > > gnuplot and just output a value. > > > > > > Now I want to just "splot evie(x,y)" where x and y are variables and > > > not only fixed values. Is it possible to do it? I haven't seen such > > > similar examples. It may be trivial, sorry. > > > > Just use the system function: > > > > alpha = 3.51e-5 > > beta = 0.09400 > > evie(x, y) \ > > = real(system("echo 90 %f 0 %f 0.1 1|./eviegompertz", x, y)) > > print evie(alpha, beta) > > > > See "help functions system" for details. > > Many thanks for your help, but I just got that: > gnuplot> evie(x, y) = real(system("echo 90 %f 0 %f 0.1 1|./eviegompertz", > x, y)) gnuplot> print evie(alpha,beta) > sh: 0.09400: command not found That means it is working, so far as gnuplot is concerned. The error message is from the system, telling you that it is trying to execute your numerical value as a command. Probably you need additional quoting. > warning: internal error--stack not empty! > (function called with too many parameters?) > 0.0 > gnuplot> help function system > Sorry, no help for 'function style system' > gnuplot> > > I will upgrade from 4.2 to latest 4.3 and will tell you. > Nicolas > > > Juergen > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > gnuplot-beta mailing list > > gnu...@li... > > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta -- Ethan Merritt (on the road) |