Author |
Topic |
|
babia
India
11 Posts |
Posted - 11/27/2015 : 02:18:05 AM
|
Hi,
I have a small problem:
i have some workbooks and i want to integrate the 2nd column with respect to 1st column for each of the workbook. The area so obtained after integration, i want to put that value in another workbook.
Please help.
Regards, Babia |
|
babia
India
11 Posts |
Posted - 11/29/2015 : 11:59:24 PM
|
Need help urgently..
Thanks in advance
|
|
|
jasonzhao
China
262 Posts |
|
babia
India
11 Posts |
Posted - 12/02/2015 : 02:39:26 AM
|
Thanks ,
But now i want to read data (area) of the result log into a separate sheet for all the integration.
Thanks in advance.
Regards, Babia |
|
|
babia
India
11 Posts |
Posted - 12/03/2015 : 12:21:58 AM
|
Hi ALL, Is there any way to read the result log.
Thanks and regards, Rajesh Agarwal |
|
|
SeanMao
China
288 Posts |
Posted - 12/03/2015 : 01:25:33 AM
|
Hi,
You can output the area to a variable and use it later on:
integ1 iy:=(Col(1), Col(2)) area:=area;
area=; // Shows the area value
Regards!
Sean
OriginLab Tech. |
|
|
babia
India
11 Posts |
Posted - 12/03/2015 : 01:45:47 AM
|
Thanks for the quick reply, but i want the area value to be read into a particular column of a workbook.
Suppose i have 100 workbooks and i have to integrated the 2nd col of each workbook and then the area value so obtained should go in the new workbook.
The code that i am using is as: Doc -ef W { integ1 iy:=(Col(1), Col(2)); // integrate col 2 wrt col 1 }; newbook name:="Average Current" sheet:=1; Col(1)[L]$="Frequency"; Col(2)[L]$="Area"; Col(3)[L]$="Abs(Area)"; Col(4)[L]$="Time"; Col(5)[L]$="Average"; Col(6)[L]$="Normalized"; Col(1)[U]$="Hz"; wautosize; // auto size the col width
col(1)={100,500,1000,5000,10000,20000,40000,50000,70000,90000,100000,120000,150000,200000};//Frequency
col(4)={0.02,0.004,0.002,4E-4,2E-4,1E-4,5E-5,4E-5,2.858E-5,2.22E-5,2E-5,1.666E-5,1.332E-5,1E-5};//Time
csetvalue col:=[ Average Current]Sheet1!col(3) formula:="abs(col(2))" recalculate:=1; csetvalue col:=[ Average Current]Sheet1!col(5) formula:=" col(3)/col(4)" recalculate:=1; csetvalue col:=[ Average Current]Sheet1!col(6) formula:=" col(3)/1e-12" recalculate:=1;
wautosize;
// plot Average current vs Frequency
plotxy iy:= [Average Current]Sheet1!(1,5) ogl:=[<new template:="C:\Users\Babia-pc\Documents\OriginLab\91\User Files\AVERAGE_AVE.otp" name:=samplegraph>]; page.longname$="Average current Vs Frequency"; // change the graph name.
layer -a;
I hope that the problem is clear.
|
|
|
SeanMao
China
288 Posts |
Posted - 12/03/2015 : 03:45:58 AM
|
Hi,
You can check out the following code:
newbook name:="Average Current" sheet:=1;
Col(1)[L]$="Frequency";
Col(2)[L]$="Area";
Col(3)[L]$="Abs(Area)";
Col(4)[L]$="Time";
Col(5)[L]$="Average";
Col(6)[L]$="Normalized";
Col(1)[U]$="Hz";
wautosize; // auto size the col width
col(1)={100,500,1000,5000,10000,20000,40000,50000,70000,90000,100000,120000,150000,200000};//Frequency
col(4)={0.02,0.004,0.002,4E-4,2E-4,1E-4,5E-5,4E-5,2.858E-5,2.22E-5,2E-5,1.666E-5,1.332E-5,1E-5};//Time
csetvalue col:=[ Average Current]Sheet1!col(3) formula:="abs(col(2))" recalculate:=1;
csetvalue col:=[ Average Current]Sheet1!col(5) formula:=" col(3)/col(4)" recalculate:=1;
csetvalue col:=[ Average Current]Sheet1!col(6) formula:=" col(3)/1e-12" recalculate:=1;
ii=1;
Doc -ef W
{
if (page.longname$!="Average Current")
{
integ1 iy:=(Col(1), Col(2)) area:=area; // integrate col 2 wrt col 1
range rTemp = ["Average Current"]1!col("Area")[$(ii)];
rTemp = area;
ii++;
}
};
Give it a try and see how it goes!
Regards!
Sean
OriginLab Tech. |
|
|
babia
India
11 Posts |
Posted - 12/03/2015 : 05:35:29 AM
|
Perfect.
Thanks a lot.
Regards, Rajesh Agarwal |
|
|
|
Topic |
|
|
|