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
 Sign change marker in 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
AKazak Posted - 07/08/2021 : 12:20:01 PM
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
4   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 07/09/2021 : 08:28:10 AM
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
cpyang Posted - 07/09/2021 : 02:57:20 AM
"--" 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
AKazak Posted - 07/08/2021 : 3:08:33 PM
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
YimingChen Posted - 07/08/2021 : 12:32:58 PM
try this:
if(sign(D)!=sign(D[i+1]),0/0,0)


James

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