newbie question, table output



El mar, 12-12-2006 a las 22:10 +0100, Hugo Coolens escribi?:
> I tried the following to get a table with data of a function called gain:
> plot2d([gain(4)],[omega,0.01,10000],[y,0.8,1.3],[GNUPLOT_PREAMBLE, "set log x"],[GNUPLOT_OUT_FILE, "test_data"], [GNUPLOT_TERM, table]);
> 
> As the terminal type table is not supported from within maxima, I suppose 
> it is in fact unnecessary and there may be a more efficient approach to 
> obtain the same result.
> 
> Can anyone suggest here how?

Hello Hugo,

Try function write_data of the numericalio package:

(%i11) pairs: makelist([0.1*i, sin(0.1*i)],i,0,5);
(%o11) [[0, 0], [0.1, .09983341664682815],
[0.2, .1986693307950612], [0.3, .2955202066613396],
[0.4, .3894183423086505], [0.5, 0.479425538604203]]
(%i12) load(numericalio)$
(%i13) write_data(pairs,"myfile");



-- 
Mario Rodriguez Riotorto
www.biomates.net