Author |
Topic  |
|
bquach17
USA
4 Posts |
Posted - 10/31/2001 : 8:31:52 PM
|
I have one graph of pressure vs. capacitance. The second graph is voltage vs. capacitance. I want to get a graph of pressure vs. voltage, but capacitance data pts do not match up so they must be interpreted from linear graphs. Can I do this w/ Origin 6?
Any help is much appreciated (I've been trying for hours now). |
|
bquach17
USA
4 Posts |
Posted - 11/01/2001 : 6:43:44 PM
|
I can do a polynomial fit for both but don't know how the invert the polynomial V(C) to C(V). Any ideas? Is there an add-on that would do it? |
 |
|
bquach17
USA
4 Posts |
Posted - 11/01/2001 : 6:48:47 PM
|
I've also tried swaping the axes for one graph but then an accurate curve cannot be fitted to it. |
 |
|
easwar
USA
1965 Posts |
Posted - 11/01/2001 : 9:08:00 PM
|
Hello,
There is an easier way to do this, that does not involve fitting but uses Origin's ability to interpolate datasets on the fly.
And it is a lot easier if you start by first flipping the x,y relationship of your data. Let us assume that you then have a worksheet named "Data1" with four columns A(X1), B(Y1), C(X2), D(Y2) where the columns in your case correspond to capacitance, pressure, capacitance and voltage respectively. Here the X variables are capacitance in both case and the Y variables are pressure and voltage, and further the two capacitance columns do not contain the same values.
Now add two more columns to your worksheet with the following designations: E(X3), F(Y3) Bring up the script window (menu item Window|Script Window), and type the following, hitting return after each line.
data1_e = data1_b data1_f = data1_d(data1_a)
The first line just copies over the first Y variable as your new X variable, which in your case is the pressure. The second line instructs Origin to compute the values of the 2nd Y variable (voltage) using the X values that correspond to the first variable (pressure). The last two columns will now have the relationship between pressure and voltage that you are looking for.
Note that in the second line of script, the () in the right hand side is what tells Origin to interpolate the values. To further illustrate this ability of Origin to perform linear interpolations between given points to obtain values at unknown points, consider the following data: A(X)--- B(Y) 1 --- 2 2 --- 4 3 --- 6 4 --- 8 5 --- 10 ( the "---" is just to show the numbers apart in this posting...you just enter 1 thru 5 in col A and 2 thru 10 in col B).
If you now type the following in the script window data1_b[1] = you will get DATA1_B[1]=2 whereas if you type data1_b(1.5)= you will get DATA1_B(1.5)=3 which Origin obtains by performing a linear interpolation.
Easwar OriginLab.
Edited by - easwar on 11/01/2001 21:33:35 |
 |
|
bquach17
USA
4 Posts |
Posted - 11/03/2001 : 11:44:25 PM
|
easwar,
THANK YOU SO MUCH! That worked like a charm. THANK YOU THANK YOU THANK YOU! This is great. Thanks for the detailed instructions! :)
-brian |
 |
|
|
Topic  |
|
|
|