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
 Average of Absolute Numbers per row
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

guy27

8 Posts

Posted - 05/21/2014 :  3:14:47 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 9.1.0 (64-bit) Sr2
Windows7 Enterprise Service Pack 1

I would like to take the average per row, of the absolute values in a few columns.

The excel equivalent is:
> =AVERAGE(ABS(A1:C1))
> which an array formula it should be committed with Ctrl-Shift-Enter
> not just Enter.

Here a good explanation on an excel forum of what I want to do:
http://www.ozgrid.com/forum/showthread.php?t=45233

I tried statistics per row, put was unable to find a solution

lkb0221

China
497 Posts

Posted - 05/21/2014 :  3:28:40 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can first add all abs value together and then divided by the number of columns, like:
(abs(col(A))+abs(col(B))+abs(col(C)))/3

Or, please see my example below, for that if you use variables:insert variables by selection, Origin will assign range by r# automatically:

And you only need to change the start and end value of the jj loop.

Zheng
OriginLab

Edited by - lkb0221 on 05/21/2014 4:31:37 PM
Go to Top of Page

guy27

8 Posts

Posted - 05/22/2014 :  02:05:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks,
especially the second solution is really useful as an example of how to do more complicated calculations using the formula entry with a script.
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