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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 calculate mean and sem form group of column repeat
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bankanidhi

India
Posts

Posted - 11/23/2017 :  08:58:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:

Hi, i have say 1000 columns with same number of rows.
I want to calculate statistics on rows with 10 column each successively and store them in new columns. How should i write a script?

or is there a origin function to do this.

Thanks

JacquelineHe

287 Posts

Posted - 11/24/2017 :  03:57:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can try to use Labtalk script to calculate statistics on rows with 10 column.

For example, if you want to get the sum on rows for each 10 column, then you can:
1. Active the worksheet with the datasets:
2. Select Windows: Script Window.. and then paste the following loop script into the window. Highlight all script, and press Enter key.


for (ii = 1; ii<1000; ii+=10)
{
rowstats irng:=[Book1]Sheet1!Col($(ii)):Col($(ii+9)) mean:=<none> sd:=<none> sum:=<new>;
}


Note: for the function rowstats, it will calculate mean and sd by default. If you do not need to get them you need to add mean:=<none> sd:=<none> in the script.

To know more details, about rowstats function and loop script, plesae refer to these help page:

https://www.originlab.com/doc/LabTalk/ref/For-cmd
https://www.originlab.com/doc/LabTalk/guide/Descriptive-statistics
https://www.originlab.com/doc/X-Function/ref/rowstats

Thanks
Jacqueline
OriginLab
Go to Top of Page

bankanidhi

India
Posts

Posted - 11/24/2017 :  07:17:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Jacqueline,
Thanks. This is working really nice. Now one additional question. Suppse i want to write all the mean and SD to a new sheet in the same book, what would be the format?

Thanks,
Banka
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000