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
 Calculating values from look-up table

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
mikefeehts110 Posted - 02/25/2013 : 10:51:20 PM
Any advice regarding making a look-up table as follows:
Assume I have two data-sets xi,yi and xj,zj. Each data set uses an independant set of (and possibly a different number of) values. What I want to be able to do is take each xj,zj point and use the xi,yi data to interpolate a yj value to 'replace' the xj value.

If this isn't clear, the following example may help:
Lets say I have a data-set of magnetic field B vs operating current I for an electromagnet - an (I,B) data-set. Then I measure current I as a function of time T - an (I,T) data-set. What I want is to plot a (B,T) graph, so for each point Ii,Ti I want to use the I,B data-set to interpolate a Bi data point (this could be a linear interpolation between neighbouring points from the I,B set for example).
3   L A T E S T    R E P L I E S    (Newest First)
jchristian Posted - 09/12/2017 : 8:07:07 PM
mikefeehts110 has an elegant solution that is useful for correcting a population of data. Interestingly, I have seen some "peculiar" behavior in OriginPro2016. For example, sometimes the "equivalent" statement, "Data2_B2=" Data2_I2+Data1_B1[Data2_T], does not execute correctly in the "set column values" window if the xvalue in Data1_T does not start at "1" (but it does execute when the xvalue starts at "1"). In my case, Data2 contains a population of x and y data points, with no functional relation: there is a T(x),I2(y) and LUT corrected B2(y). The LUT in Data1 contains all of the possible xvalues of data2, with a correction factor that depends on the xvalue: I1(x) and B1(y). In my case, the xdata is an integer (from an ADC).
mikefeehts110 Posted - 02/26/2013 : 5:56:06 PM
Thanks Snow. I have a rather old version of Origin (OriginPro 7.5), so could not find any Analysis:Mathematics:Interpolate... function dealing with datasets (there is a similarly named function if you have an active graph but it has a much simpler action).

However, I was eventually able to find a solution as follows:
if I have a dataset Data1, with columns I1(x),B1(y),T(x),I2(y),B2(y) , with I1,B1,T, and I2 as described previously, then I can populate B2 by entering
Data1_B2=Data1_B1(Data1_I2);
into the scripting window.
snowli Posted - 02/26/2013 : 2:55:24 PM
Hello,

If your datasets are organized in one worksheet, here is what you can do:

1. For (I, B) dataset, put I data in column A. Put B data in col B.
2. For (I, T) dataset, Put I data are in column C. Put T data in column D. (Note: If I is a function of T, you can right click column C and choose Set Column Values. Set the formular related to column D).
3. Highlight columns A and B and choose Analysis: Mathematics: Interpolate/Extrapolate Y from X.
--> A dialog opens. The interpolate will be done on column A and B so Input is filled with is column A and B automatically.
4. Choose arrow next to X Value to Interpolate and choose Column C.
5. You can choose Recalculate to be Auto. Click OK.
--> A new column is added to the worksheet, with interpolated B.
6. Now don't highlight any column, click the data plot, e.g. scatter plot.
--> Plot Setup dialog opens. You can check column E (the interpolated B) as X. check column D (T) as Y and to plot (B,T).

Note: Since the Recalculation is set to Auto, if column A, B, and C are changed, the interpolation result will update automatically.

Thanks, Snow Li
OriginLab Corp.

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