T O P I C R E V I E W |
Bempel |
Posted - 02/26/2003 : 3:10:29 PM Hi,
I have a script that automates my plotting I can calculate the mean value of one column, but how does it work with more columns?? Here is the part of my script that handles with it. I want to calculate 3 mean values, but how can I make the difference between the three sum.mean ??. The lines where the problems occur are marked "HERE".
loop (ii,ini,nbc) { type $(ii); %O=%[%a,'_']_$(ii).dat; win -t wks; open -w %O; type %O; type %H; work -c M; work -c O; %H_O=abs(%H_fichier/%H_du);
// find mean of col(L) set col(L) -bs 1; set col(L) -es 50; sum(col(L));
// find mean of col(G) set col(G) -bs a1; set col(G) -es a2; sum(col(G));
// find mean of col(O) set col(O) -bs b1; set col(O) -es b2; sum(col(O));
run.section(,MakePlot);
label -s -p 118 0 \+(%H); %L="T\-(c) = $(temp) °C"; %M="T\-(eff) = $(sum.mean,.2) °C";
%X="\g(j) = $(sum.mean,.2) °"; //HERE %Y="R = $(sum.mean,.2)"; //HERE
label -s -p 118 5 \+(%L); label -s -p 118 10 \+(%M); label -s -p 118 15 \+(%X); label -s -p 118 20 \+(%Y);
};
Best regards
Stephane |
1 L A T E S T R E P L I E S (Newest First) |
Mike Buess |
Posted - 02/26/2003 : 4:16:38 PM Hi Stephane,
Just save the means under different names...
sum(col(L)); Lmean=sum.mean;
sum(col(G)); Gmean=sum.mean;
sum(col(O)); Omean=sum.mean;
%M="T\-(eff) = $(Omean,.2) °C"; %X="\g(j) = $(Gmean,.2) °"; %Y="R = $(Lmean,.2)";
I may have used them in the wrong labels, but you get the idea.
Mike Buess Origin WebRing Member |
|
|