T O P I C R E V I E W |
JThieser |
Posted - 10/07/2011 : 04:14:55 AM Origin Ver. and Service Release (Select Help-->About Origin): Operating System: Hi togehter, I have a short question. I'm Working often with data wih a certain time series. I use a function which is called %H_col(G)+book1_b: this means that i have a data set e.g book 2 with a certain timeseries and with this function I bring other data from an other timeseries (book1) top the book 2 time series. Normally it is working fine but sometimes it doesn't and i cannot understand it. Is there an other option to deal with it. Now i have to time series. One from the 16.08 to the 9.9 with 108000 data points and one with 140000 for the same time. Now I would like to get the data set with the higher number to that with the lower number....
Thanks
Cheers Jim |
4 L A T E S T R E P L I E S (Newest First) |
JThieser |
Posted - 10/11/2011 : 03:40:47 AM Thanks alot. I tried the interp1 and it is working really good... Cheers Jim |
Drbobshepherd |
Posted - 10/10/2011 : 6:00:45 PM Try interp1q anyway. It will interpolate Y(X) values of one series to the resolution of another, whether you want to increase resolution or decrease. However, the output time interval must be within the input time interval, or else you are extrapolating and errors may occur.
As for the reason your %H_ function doesn't work sometimes? First, %H_col(G)+book1_b doesn't look like a function to me; it looks like an expression. Nothing happens when you execute an expression. You need to evaluate it and save the result somewhere. I am guessing you are using your %H_ expression in some kind of executable statement, with inconsistant results. This is because %H is a reserved string variable that changes its value every time you select a window. |
JThieser |
Posted - 10/10/2011 : 08:34:36 AM thanks for the reply but it is the other way around. I want to bring the 140k points to the 108k points so that means that 32k points of the 140k should be deleted ... i wrote a small script but this needs alot of computing time... and i don't know understand why the %H_ function is not working... thanks alot... |
Drbobshepherd |
Posted - 10/07/2011 : 5:28:47 PM You say you have 2 time series for the same period, but one has 108k samples and the other has 140k, and you want to interpolate the smaller dataset to match the resolution of the larger one, right? Try using the X-function, interp1q. This will perform a simple linear interpolation on the datasets you specify with range notation. For example, the following code will interpolate [Book2]1!col(2) data to the same time-res as [Book1]1!col(Time) and output the result to [Book1]1!col(3):
range t_hires=[Book1]1!col(Time),y_hires=[Book1]1!col(3); range t_lores=[Book2]1!col(Time), y_lores=[Book2]1!col(2); interp1q ix:=t_hires iy:=(t_lores,y_lores) ox:=y_hires;
|