From: Lev A. M. <mel...@ma...> - 2012-07-30 20:43:58
|
Hi, the function I need to plot is a result of nontrivial computation (each data point is obtained by solving an ODE). I have implemented it in C, but executing the program with real(system(sprintf("somecommand %f %f", x, y))) once for each data point (this is a 3d surface) implies a significant overhead. My program is statically linked, still this is too slow. I need grid data (to create contours), so building the datafile is inefficient. Ideally I'd like to see an option to open a pipe and write the arguments to it and read the results from it. My program would be glad to work in this mode. Is this possible? I'm using Linux if this matters. Thanks in advance -L |