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 for Programming
 LabTalk Forum
 Returned Range of Sum Function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

CJKS

USA
Posts

Posted - 05/30/2006 :  1:43:12 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello,

In the help file example we are told that,

<quote>

sum(DATA1_A);

If DATA1_A contains 4 values (1, 2, 3, 4), this script returns the range (1, 3, 6, 10) where the second value in the returned range (3) is the sum of the first two values in DATA1_A, etc.

</quote>

While the following object properties: sum.mean, sum.total, sum.min, sum.max, sum.sd, sum.n. all work great. I am trying to access the entire returned range of the sum(dataset) function (ie. (1,3,6,10) from the above example). Is there a way to output this range into a new column?

Mike Buess

USA
3037 Posts

Posted - 05/30/2006 :  1:53:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If the worksheet is active it's as simple as this...
col(B)=sum(col(A));

Otherwise...
Data1_B=sum(Data1_A);

Mike Buess
Origin WebRing Member
Go to Top of Page

CJKS

USA
Posts

Posted - 05/30/2006 :  3:04:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks Mike. Very simple indeed!
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