|
From: Tatsuro M. <tma...@ya...> - 2008-04-06 09:06:24
|
Hello
This is not direct answer to your reply.
In gnuplot FAQ,
5.4 I need an integration, fft, iir-filter,...!
Gnuplot has been and is a plotting program, not a data processing or mathematical program suite.
Therefore gnuplot can't do that. Look into the demo file "bivariat.dem" for a basic implementation of
an integration.
For more sophisticated data-processing read the next section
*******************************************************
Please see demo file "bivariat.dem" how to realize integration by gnuplot script.
Regards
Tatsuro
--- Dieter Jurzitza <die...@t-...> wrote:
> Dear listmembers,
> I recently had the need to integrate a function for some reason. Therefore I
> wrote a small script that takes the data out of a gnuplot-generated table in
> a file and calculates the linearly interpolated area between two consecutive
> x-values of the table I wrote with gnuplot.
>
> To use this from within gnuplot, I do the following:
>
> say, the function is x*x and I want to integrate between 0 and 1:
>
> set xrange[0:1]
> set samples 1000
> set table "dummy.dat"
> plot x*x
> set output
> set terminal X11
> A=system ("integrate dummy.dat")
> print A
>
> The script "integrate" reads the table and outputs the integral value as
> described above. The assignment of the output of the system-command
> A=system(... results in what I want: I have the integral value "at hand"
> within gnuplot.
>
> Now I thought about skipping the intermediate step to write to a file:
>
> set table
> plot x*x
> set output "| integrate -"
>
> This results in the integral value being printed on the screen. However, I do
> not know how to "put this output" into a variable like the return value of
> the system() command can be assigned to.
>
> Does anybody have an idea whether and how this can be achieved?
>
> Thank you very much for looking into this,
> take care
>
>
>
> Dieter Jurzitza
>
>
> --
> -----------------------------------------------------------
>
> |
> \
> /\_/\ |
> | ~x~ |/-----\ /
> \ /- \_/
> ^^__ _ / _ ____ /
> <°°__ \- \_/ | |/ | |
> || || _| _| _| _|
>
> if you really want to see the pictures above - use some font
> with constant spacing like courier! :-)
> -----------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
--------------------------------------
GANBARE! NIPPON! Win your ticket to Olympic Games 2008.
http://pr.mail.yahoo.co.jp/ganbare-nippon/
|