Origin scripting

By | August 22, 2012

Origin scripting can be very useful, but I’ve never really got to grips with it.

To avoid having to use many different menus to manipulate workbooks, you can use ‘Before formula scripts‘ when you set column values.

It took me a while to find a good guide on this, but this is what i was looking for:

http://www.originlab.com/index.aspx?go=Products/Origin/DataAnalysis/Mathematics/SimpleMathematics

Origin scripting – calculating the mean

As a quick example, let’s calculate the mean of a column of data in origin.

I’ll start with a simple table of data in columns a and b:

origin data

The data for this example. Column c shows the mean of the data in column b

 

Here I’ve added the mean as a constant value in column c. To do this I right clicked on column C to ‘set values as’. Into the resulting dialogue box I type this:

set values

How to set values with a script

Graphically, what we have done is this:

Plotting the original data and mean.

Plotting the original data and mean.