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
 Rowstats and ImpASC
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

gstiago

Brazil
9 Posts

Posted - 05/15/2016 :  10:24:12 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.1 SR1
Operating System:Windows 7

Hello friends, I need a Help with rowstats and ImpASC.
I am using a impasc and findfiles, for get some specific files, all works good, but now I need get the mean and std of data and I use that:

rowstats irng:=( COL(2),COL(4),COL(6)) mean:= col(7) sd:=col(8);
(three files with two columns in this case)

This works nice, but the numbers of files changes. I know how to get this numbers by: int n = fns.GetNumTokens(CRLF).

Is there any way to automatically change irng for irng:=( COL(2),COL(4),COL(6)) for

irng:=( COL(2),COL(4),COL(6),COL(8))

if the files number changed the three for four..

My best Regards.



T. G. Santos

easwar

USA
1965 Posts

Posted - 05/15/2016 :  1:47:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Santos,

You can use a loop to select every other column. Then the rowstats XF will work on the selection:


// Select every other col starting from col 2
for(ii = 2 ; ii <= wks.ncols ; ii+=2)
{
  wks.colSel(ii,1);
}
// Stats will work on selected cols
// Mean and sd are default outputs, so do not need to specify
rowstats;
// Optional - deselect the cols
wo -s;


Easwar
OrignLab

Go to Top of Page

gstiago

Brazil
9 Posts

Posted - 05/15/2016 :  3:04:51 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Dear Easwar,

Well done, this works nice.

Thank you.

My best regards.




T. G. Santos
Go to Top of Page

phancaopatrick149

USA
1 Posts

Posted - 05/23/2016 :  09:29:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
We invite you to explore our site to learn more about who we are, what we do and how we can assist you and your loved ones. You will find a wealth of valuable information here, including videos and blog posts about topics that, over the years, many of our clients have asked about at our initial meetings.

http://assetprotectioncenter.com/

[url=http://assetprotectioncenter.com/]asset protection attorney california[/url]
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