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
 Sign change marker in a column
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

AKazak

Russia
1205 Posts

Posted - 07/08/2021 :  12:20:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
OriginPro 2021b (64-bit) SR2 9.8.5.212
Windows 10 21H1 x64

Greetings!

I want to put the missing value in the cell using the following column formula:

if(sign(D)!=sign(D[i+1]),--,0)


However it seems to break in the middle of my table:


What could cause this?

Thank you.

---
Andrey

YimingChen

1669 Posts

Posted - 07/08/2021 :  12:32:58 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
try this:
if(sign(D)!=sign(D[i+1]),0/0,0)


James
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/08/2021 :  3:08:33 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by YimingChen

try this:
if(sign(D)!=sign(D[i+1]),0/0,0)


James



It works as expected!
Please clarify the difference between 0/0 and --.

Thank you.

---
Andrey

Edited by - AKazak on 07/08/2021 10:39:47 PM
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 07/09/2021 :  02:57:20 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
"--" is not a valid numeric expression, it is what we show in results for a missing value. Sure we can improve that particular function so any invalid text entered should resolve into a missing value so most likely that function didn't do that.

You can also use a function to indicate missing value, like NA().

0/0 is the way we used in most places as an expression that will resolve into a missing value.

CP
Go to Top of Page

AKazak

Russia
1205 Posts

Posted - 07/09/2021 :  08:28:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by cpyang

"--" is not a valid numeric expression, it is what we show in results for a missing value. Sure we can improve that particular function so any invalid text entered should resolve into a missing value so most likely that function didn't do that.

You can also use a function to indicate missing value, like NA().

0/0 is the way we used in most places as an expression that will resolve into a missing value.

CP




Got it!
Thank you.

---
Andrey
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