T O P I C R E V I E W |
uschi007 |
Posted - 03/26/2004 : 12:24:20 PM Hi,
may be I'm to stupid, but I haven't managed to simply bin-average data. I've got two Columns A and B; Column A is temperature data, B the corresponding conductivity. I want to bin temperature values (in 0.5 Kelvin Intervalls) and calculate the average conductivity value as well as the standard deviation from each temperature intervall (bin).
I would be very pleased if anybody could help me with that.
So long,
Uschi |
1 L A T E S T R E P L I E S (Newest First) |
sammi.song |
Posted - 03/29/2004 : 05:18:30 AM Hi uschi007,
Origin can't achieve that with a menu, but you can execute with the followng labtalk frist: win -a %H; //Active current worksheet wks.colsel(1, 1); //select temperature dataset sum(%c); Max=$(sum.max); Min=$(sum.min); N=$(sum.n); Step=0.5; //specify 0.5 as Kelvin Intervalls Figure=(Max-Min)/Step; Num=nint(Figure); if (Figure>Num) Num=Num+1; // interval nums. i = Num*2; for (k=1; k<=i; k++) //append columns according to interval nums. { wks.addCol(Temp$(k)); wks.addCol(Conduc$(k)); }; del -v k; for (k=1; k<=N; k++) { Z=(Col(A)[$(K)]-Min)/Step; //extract every cell in temperature dataset V=nint(Z); if (Z>V) V=V+1; Col(Temp$(V))[$(k)]=Col(A)[$(K)]; //append values into corresponding columns Col(Conduc$(V))[$(k)]=Col(B)[$(K)]; }; Then, select "Statistics: Statistics on column" menu accordingly , you can Statistics each new temperature and its corresponding conductivity column within the interval. Hope it would be useful!
Thanks, Sammi |
|
|