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 for Programming
 LabTalk Forum
 Hourly means
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Hanspeter

Switzerland
5 Posts

Posted - 11/10/2003 :  2:28:43 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi there

How can I caluculate the hourly mean of time series?

For example:

time serie:

date time row1 row2 ...
11.11.2003 10:00 100 200...
11.11.2003 11:00 140 150...
...
31.11.2003 24:00 65 35

result:
time row1 row2 ...
01:00 95 75
02:00 65 24
...
24:00 90 86

Can somebody help me?

Thanks Hanspeter

edgar.kaiser

Switzerland
29 Posts

Posted - 11/12/2003 :  04:03:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hanspeter,

can you pose your question more precisely? I don't understand the example.

Regards,

Edgar
Go to Top of Page

Hanspeter

Switzerland
5 Posts

Posted - 11/14/2003 :  10:19:41 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Edgar

I'm working in the environmental research. We are analysing time series of different stations. The dates of different parameters (ex. temperature, ozone) are collected continously every half hour.

Different analyses have to be done with this time series. Just in time I'have to calculate the average every half hour of a day (from 00:30 to 24:00) over a periode from for example the month october 2003.

How can I calculate this with Origin?

Thanks Hanspeter



Lieber Edgar

Ich bin im Umweltschutz tätig. Wir untersuchen dabei Zeitreihen verschiedener Stationen. Die Daten verschiedener Grössen (Bsp. Temperatur, Ozon) werden kontinuierlich jede halbe Stunde erhoben und abgelegt.

Verschiedene Auswertungen müssen aus den Zeitreihen gemacht werden. Insbesonders interessiert mich zur Zeit der mittlere Tagesgang (Mittelwert der Grössen um 0:30; 01:00 ... 24:00) beispielsweise eines Monates.

Frage wie kann ich diese Auswertung mit Origin realisieren?


Thanks Hanspeter





Go to Top of Page

edgar.kaiser

Switzerland
29 Posts

Posted - 11/17/2003 :  04:25:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Hanspeter,

this can easily be done in Origin and there are of course many possible ways, both, in LabTalk and in OriginC. I will give an example in LabTalk.

Let's assume your data is in the worksheet named timeseries and the resulting semi-hourly averages will be written into a worksheet named averages that is initially empty and contains a row named row1 for the averages of your row1 timeseries. The time-column in your timeseries worksheet must be set to time format.

lastrow = timeseries!wks.maxrows;
//determines the number of datalines in your worksheet

for(ii = 1; ii <= lastrow; ii++)
{
for(jj = 1; jj <= 48; jj++)
{
if(timeseries_time[ii] == jj/48)
averages_row1[jj] += timeseries_row1[ii];
}
}

This is a rather straightforward and stupid procedure but will do it's job.
I hope, that can help you.

Best regards,

Edgar
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