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
 Get mean value of rows
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bedibra

France
35 Posts

Posted - 08/23/2017 :  09:47:38 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,
I am looking for a way using the set values function to get get the mean of values in columns a to c in row 1.
I will really appreciate your help.
Thanks

arstern

USA
237 Posts

Posted - 08/23/2017 :  11:13:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can use the Statistics on Rows dialog.
Select Statistics --> Descriptive Statistics --> Statistics on Rows

Input tab --> Select all rows that you want to find the mean for.
Quantities tab --> select Mean.

Output tab --> Under Column tab
select Next to Source

This will add the Mean value for each row in the column next to your selected rows i.e. col(D).






Aviel
OriginLab
Go to Top of Page

bedibra

France
35 Posts

Posted - 08/23/2017 :  11:23:34 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your fast response, I am aware of this possibility, but I want to do it with set values function if possible.
Thanks
Go to Top of Page

couturier

France
291 Posts

Posted - 08/23/2017 :  2:34:43 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If all your columns have the same numbers of rows:
Col(D)=
(mean(col(A))+mean(col(B))+mean(col(C)))/3

In case your columns don't have the same numbers of rows:
Before Formula Script:
range r1=1, r2=2, r3=3;
dataset ds=r1; ///copy col(A) into temporary dataset
copy -a r2 ds; // append col(B)
copy -a r3 ds; // append col(C)

Col(D)=
mean(ds)

Edited by - couturier on 08/23/2017 2:36:18 PM
Go to Top of Page

bedibra

France
35 Posts

Posted - 08/23/2017 :  6:00:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you for your response, but I am trying to calculate the mean within the first row of col(A) to col(C).
quote:
Originally posted by couturier

If all your columns have the same numbers of rows:
Col(D)=
(mean(col(A))+mean(col(B))+mean(col(C)))/3

In case your columns don't have the same numbers of rows:
Before Formula Script:
range r1=1, r2=2, r3=3;
dataset ds=r1; ///copy col(A) into temporary dataset
copy -a r2 ds; // append col(B)
copy -a r3 ds; // append col(C)

Col(D)=
mean(ds)


Go to Top of Page

arstern

USA
237 Posts

Posted - 08/24/2017 :  5:47:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
you can use rowstats x function
http://www.originlab.com/doc/X-Function/ref/rowstats



Aviel
OriginLab
Go to Top of Page

bedibra

France
35 Posts

Posted - 08/24/2017 :  6:39:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thank you for your response, this partially solved the problem .
BUT I don't understand why it is automatically creating the book2(as in picture) and I don't understand what are those values in this book2.
any help ?

quote:
Originally posted by arstern

Hi,
you can use rowstats x function
http://www.originlab.com/doc/X-Function/ref/rowstats



Aviel
OriginLab

Go to Top of Page

arstern

USA
237 Posts

Posted - 08/28/2017 :  1:01:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can select the green lock to view the output. I believe the new worksheet is recording the standard deviation for each row. I am not exactly sure how to turn this off.

However, I found another way to to calculate row mean.
http://www.originlab.com/doc/LabTalk/ref/Sum-func




Aviel
OriginLab
Go to Top of Page

bedibra

France
35 Posts

Posted - 08/28/2017 :  7:15:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
finally this is doing the job well:
rowstats irng:=5! mean:=col(B) sd:=<none>;

thanks
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