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
 All Forums
 Origin Forum
 Origin Forum
 Time Delay

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
gleeblejim Posted - 09/18/2012 : 09:07:45 AM
Origin Ver. 8.6 and Service Release 3 (Select Help-->About Origin):
Operating System: Win 7

Good Day Origin Crew!

I'm looking to find the time delay between two sets of data, in this case Distance (measured) and PDistance(ideal). The tests will be controlled so the only thing that will change from test to test is Distance. Is there any way in Set Column Values to tell Origin to average the time difference between two columns, for instance when Distance = 2,4,6,8 then find Average(Time of PDistance at # - Time of Distance at #)?

Thank you,
Jim
4   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 09/19/2012 : 2:32:05 PM
Hi Jim,

Maybe I'm lazy, but if I were, I will fit your two plots with a sigmoidal function, e.g., Boltzmann (independently, or globally with shared parameters); Then, you can subtract the x coordinates of the centers.
It would work even when the data is noisy.

--Hideo Fujii
OriginLab
Drbobshepherd Posted - 09/19/2012 : 12:20:08 PM
OK. Try this.

1. Add a column to the 3 you already have. Longname it "Delay".
2. Select the column, and open the Set Column Values dialog.
3. Enter the following in the Before-Formula-Script window:

interp1 ix:=Col(C) iy:=(Col(B), Col(A)) ox:=Col(D); // Interpolate t value on PD curve for each D value.
Col(D)=Col(D)-Col(A); // Calculate delay.
avg=mean(Col(D)); // Calculate mean delay.
Col(D)[C]$=Mean= $(avg,.3); // Type value in Comments, format to 3 decimal places.

4. Click on OK.

I hope this works for you. If it does, you may wish to save it as an Analysis Workbook for future processing.

DrBobShepherd
gleeblejim Posted - 09/18/2012 : 4:09:03 PM
Sorry for not clarifying in the original post. In my software Time is always acquired as the X value and everything else is Y. The data file would look like:

Time(X) PDistance(Y) Distance(Y)
(sec) (mm) (mm)
0 0 0
1 1 0.5
2 2 1
3 3 2
4 4 3
5 4 4

And I would like to make a template that has one of the columns automatically find the time delay for the two columns. The attached image shows the area I'm interested in.
Drbobshepherd Posted - 09/18/2012 : 3:56:03 PM
Jim,

I am not sure, but it looks like from your example that you are describing a time measurement for a fixed set of distances. Are "Distance" the independent variable, and "Predicted Time at Distance" and "Measured Time at Distance" your dependent variables?

I'm just guessing, but I think you are asking how to use Set Column Values to average a number of datasets and subtract the average from a dataset of predicted values. If you know the number of datasets to average, it isn't difficult. For example, say the following table is your data:

d tPred tMeas1 tMeas2 tMeas3
2 5.000 4.2040 4.5160 4.6230
4 7.777 7.6050 7.5430 7.6120
6 9.500 8.9700 9.0010 9.5960
8 11.00 10.502 10.999 10.755

Add a column. Set Column Values so that Col(F)=

Col(B)-((Col(C)+Col(D)+Col(E)/3))

Apply an appropriate label to this column and you are done. The results should look something like this:

d tPred tMeas1 tMeas2 tMeas3 Avg(tP-tM)
2 5.000 4.2040 4.5160 4.6230 0.55233
4 7.777 7.6050 7.5430 7.6120 0.19033
6 9.500 8.9700 9.0010 9.5960 0.31100
8 11.00 10.502 10.999 10.755 0.24800

If the number of measured datasets is unknown, you should write a LabTalk script to get the number and calculate the average in the advanced Before-Formula-Script window in the Set-Column-Values dialog.

I hope this answered your question?

DrBobShepherd

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000