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

jmbeaujour

USA
5 Posts

Posted - 12/30/2012 :  9:17:15 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.6
Operating System: WinXP

What's the equivalent of NaN in LabTalk?

Here is what I am tryign to do.
I have a long worksheet that I'd need to split in smaller wksheet and the key character for the separation is 2 empty rows like below:

Main wksheet
1 1 1
1 1 1
1 1 1


2 2 2
2 2 2
2 2 2
2 2 2

wksheet1
1 1 1
1 1 1
1 1 1

wksheet2
2 2 2
2 2 2
2 2 2
2 2 2


Here is what I wanted to start with:
page.active$= shname$;
indexWksheet = 1
for(int rowi = 1; rowi <= wks.maxRows; rowi++){
if((col(1)[rowi]==NaN)) {
indexWksheet = indexWksheet++ }
else{
//add row to current indexWksheet
}
}

Tank you for your help.

cdrozdowski111

USA
247 Posts

Posted - 12/31/2012 :  07:47:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Check out:

http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:ISNA_(function)

http://wiki.originlab.com/~originla/ltwiki/index.php?title=LabTalk:NA_(function)
Go to Top of Page

greg

USA
1378 Posts

Posted - 12/31/2012 :  09:07:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Above links do not work unless you copy/paste all text (at least in Firefox).

Examples:
var1 = NA(); // Creates a variable with missing value
var2 = 1/0; // Another approach
if(ISNA(var1)) ty Indeed; else ty $(var1); // Test for missing value
if(var2==NANUM) ty It is; else ty $(var2); // Another test
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