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
 reading the first and last values of a dataset...

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
zskillz Posted - 10/11/2003 : 9:29:21 PM
I need to read the first and last values in colA of a data set. the first is simple enough, but how can I read what the last value is if there are more rows in the dataset then there are values in the column...

just to clarify. I have a data set w/ 8 rows...

1
2
3
4
5
[blank]
[blank]
[blank]

and i want to read 1 and 5 and set them to a min and max variable...

alternatively... I know that these values will be the minimum and maximum, respectively, of the data set... however, i cannot seem to find a way to read the "max" or "min" value of a data set..

any ideas are warmly welcomed!

thanks
-Z
2   L A T E S T    R E P L I E S    (Newest First)
Peter.Hors1 Posted - 10/21/2003 : 10:27:49 AM
Without blanks this works (think you know that):
get data1_B -e last; last=;

With blanks this works if you dont have any blank in between:
for (i=1;i<=wks.nrows;i++) {
if(data1_B[i]==) {type found last one in row $(i-1)!; break;}
};



Peter Horstmann
Robert Bosch GmbH
Germany
cpyang Posted - 10/11/2003 : 11:01:23 PM
If you just need to get the min/max of a dataset, you can use the Sum function, like


sum(col(a));sum.min=;sum.max=;


CP



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