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
 Average Multiple Curves

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
jqian Posted - 11/15/2021 : 7:11:59 PM
Origin Ver 2021b. and Service Release (Selei Help-->About Origin):
Operating System:

I have a lot data with same format, each of them have multiple columns. I can use the following script to do the Average Multiple Curves. But the following script only can make one column in all of the data sets. May I know how can I do multiple columns, such as, except the column 2, I want to get column 10 in the data set also. The averaged data (columns 2 and 10)from the AverageMultipleCurves will be on same worksheet.

Thanks for your help!

*********************************************
string dscBook$=%H;

// Perform average on all data using linear interpolation
avecurves iy:=[dscBook$](1:end)!(1,2) // (x range) (y range)
rd:=[<input>]<new name:="Averaged Data">!
method:=ave
avex:=same
interp:=linear;
5   L A T E S T    R E P L I E S    (Newest First)
jqian Posted - 11/16/2021 : 5:58:02 PM
James,

Thanks for your help.

Used your code:
avecurves iy:=[dscBook$](1:end)!(1,2) avex:=same rd:=[Book2]Sheet1;
avecurves iy:=[dscBook$](1:end)!(1,10) avex:=same rd:=[Book2]Sheet1;

I just removed the avex:same and got same number of data points.
It is good. It is done. Thanks!

Now I have the 2nd question which is related the the 1st one.
I tried to load data file and add the script to the loading process.

If I don't add the script there (in loading), files can be imported without problem.
But after adding the script, only one column is loaded there and a warning message showed up: Please Select Input Range.

Please give me some suggestion.

Thanks,
Jqian





jqian Posted - 11/16/2021 : 3:44:30 PM
Hi James,

I tried your code.
It seems that it does created a new data sheet with averaged data there.

But the averaged data have over 7000 data points other than original 1000 data points in my data files. (I thought the avex:=same was for the issue.)

Could you find out the reason?

Thanks,
Jqian
YimingChen Posted - 11/16/2021 : 12:04:21 PM
Can you specify the output worksheet in the X-function, see below:

avecurves iy:=[dscBook$](1:end)!(1,2) avex:=same rd:=[Book2]Sheet1;
avecurves iy:=[dscBook$](1:end)!(1,10) avex:=same rd:=[Book2]Sheet1;


James
jqian Posted - 11/16/2021 : 11:31:31 AM
James,

Thanks for your help.

Probably I did describe my question clearly. Or probably my original script was not right.

I tried the avecurves -d iy:=[dscBook$](1:end)!((1,2),(1,10))
It seems that the columns 2 and 10 data are averaged together.
That was not what I intended to do.

I would like to generate a data sheet with, for example, three columns, the averaged X, the averaged column 2 and the averaged column 10 from the Average Multiple Curves of all files.

Thanks,
jqian
YimingChen Posted - 11/16/2021 : 09:26:55 AM
Can you try:
avecurves -d iy:=[dscBook$](1:end)!((1,2),(1,10))


James

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