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.

Screensize:
Anti-Spam Code:
Format Mode:
Format:

Message:

* HTML is OFF
* Forum Code is ON
 Smilies

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 to100 - 10 + 1 = 91But 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=; ```KathyOriginlab 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 BuessOrigin WebRing Member

 The Origin Forum © 2008 Originlab Corporation