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
 number of elements of a column

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
carsten Posted - 12/11/2007 : 11:08:12 AM
Origin Version (Select Help-->About Origin):
Operating System:

How can I get the number of elements of a column of type TEXT?

Carsten
4   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 07/11/2012 : 2:13:51 PM
Of course Kathy's example can be simplified to
100 - 10 + 1 = 91

But there are nuances to your question ..
If you mean you want the number of cells with text, then this will do the job:
range ra = col(2);
count = 0;
start = 10;
end = 100;
loop(ii,start,end)
{
if(ra[ii]$!="--") count++;
}
count=;

You can use the discfreqs X-Function to get a unique list of values.
Kathy_Wang Posted - 06/27/2012 : 10:45:55 PM
Hi RedAndWhite,

Is the number of elements equivalent to the size of your data selection?
If so, you may define your data selection as a range and get its size.

For example:

//Define your specific region as a range variable
range rr=col(1)[10:100];
//x is the range size
int x=rr.GetSize();
x=;


Kathy
Originlab
RedAndWhite Posted - 06/27/2012 : 5:08:26 PM
Hi,

Is it also possible to only get the number of element in a specific region of a column? Like the number of elements in column A in rows 10 to 100.

Stefan
Mike Buess Posted - 12/11/2007 : 12:55:45 PM
Same as Numeric or Text+Numeric column...

get col(columnName) -e npt;
npt=; // # of elements?

Mike Buess
Origin WebRing Member

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