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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Calculations for columns in a group of three

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
vduzivatel Posted - 03/28/2024 : 4:57:15 PM
OriginPro 2019b (32-bit)
9.6.5.169
Operating System: Windows 11

Hi, I am looking for commands/script to calculate MEAN/100 of a group of three columns. The script should calculate the MEAN/100 for all groups in the active worksheet. The first column in the worksheet should be skipped.

What I have already written is this:

ncols=wks.ncols;
for(ii=ncols;ii>=1;ii--)
{
if (wks.col$(ii).nrows==0)
{
del col($(ii));
}
else break;
}//deletes empty columns

(wks.ncols-1)/3= //calculates the number of groups to calculate MEAN/100


I don't know how to continue further. AI didn't help.



1   L A T E S T    R E P L I E S    (Newest First)
jasmine_chan Posted - 03/29/2024 : 02:53:21 AM
Compute descriptive statistics on columns, you can use stats X-Fuction.

range rr = [book2]Sheet1!($(ii):$(ii+2)); //put 3 columns in a range
stats ix:=rr mean:=t_mean; //get mean to t_mean
t_mean = t_mean/100;

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000