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
 Plot dy/dx vs y for multiple columns

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
felixs Posted - 02/08/2020 : 3:58:56 PM
Origin 9.2, Win10 64

I measured voltage (y) over time (x) with time equally spaced yielding 5000 y-datapoints. I have 30 measurements yielding 30 y columns all with the same x column.
Now I want to plot the derivative (dy/dx)vs y. So, each previous y is now x and its derivative is the new y, yielding 30 x,y columns.
How can I do that without having to manually sort and reassign x/y values? I have about 100 datafiles that I want to do this on and doing it manually will 'kill me'
thanks for any advise
Felix
1   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 02/10/2020 : 12:30:39 PM
Hi,

You can make the operations into an analysis template and in the future either import data into this template or run batch processing.
1. Start a new workbook and import your data. (31 columns, 1 x and 30 y's).
2. Run differentiation tool on column 2, set recalculate mode to Auto in the dialog. It creates a new column in the worksheet.
3. click on the green lock on the resulting column header and select Repeat this for all y columns. Now 30 more columns are added with derivative data and worksheet has totally 61 columns.
4. From col 2 to col 31, we are going to plot with column (2,32), (3,33)... that is (i, i+30). Select menu Worksheet: Worksheet Script.., add following script:

wksname$ = page.name$;
win -t plot;	
gpname$ = page.name$;
for (int i = 2; i <= 31; i++)
{
	plotxy iy:=[wksname$]1!($(i),$(i+30)) plot:=202 o:=[gpname$]1!;
}
layer -g;


We can trigger the script when the derivative data in the worksheet is changed. Check Upon Changes in Range(s) and enter 32 in the entry. You can click the running man button to test the script.



5. Save the workbook as analysis template. You can use this analysis template to run batch processing to handle other data files.

If you need more help, please contact us at <tech@originlab.com>.

James

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