|
From: Jon <dev...@gm...> - 2011-01-29 06:52:57
|
Dear All, I am trying to carry out sum functionality on a dataset, and wonder how I can possible do that. Suppose I have dataset aaa.txt 1 4 2 5 3 4 4 9 5 10 and I would like to get sum of the second column. I guess the basic idea is to use set term dumb, and thought of something like this set term dumb s=0 plot 'aaa.txt' u (s=s+$2,$1):2 w l but it complains that ')' expected. I kind of know why as everything in the plot statement is treated as character expression, and might not recognize "+" operation. Please correct me if wrong. So what else can I do to get me out of this problem? Many thanks!! Sincerely, Jon |