The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Need help to bin-average data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

uschi007

Austria
Posts

Posted - 03/26/2004 :  12:24:20 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

sammi.song

China
46 Posts

Posted - 03/29/2004 :  05:18:30 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000