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
 comparing complete colums or datasets

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
JokerOne Posted - 03/08/2016 : 03:33:57 AM
Origin Ver. 9.1 and Service Release 1(Select Help-->About Origin):
Operating System: Win 7

Is there a particular command to check, if ALL members (cells) of two datasets (colums) are equal.

e.g.:
dataset a = {1:3};
dataset b = {1:3};
c = (a==b);// (??? - expected: c = 1)
b[3] = 4; // Now a != b
c = (a==b);// (??? - expected: c = 0 but results: 1)

Also, imagine the same data put into col(a) and col(b) in a worksheet.
Can I somehow check:
d = (col(a) == col(b)) or such?

I am aware that I could script a (potential? double-) for loop look to check this line-wise, but I would like to know, if there is an easier way.

Thanks!


1   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 03/08/2016 : 04:39:17 AM
Hello,

You can sum the relative distance between Column A and Column B in this way:


dd=sum(Distance(0,col(A),0,col(B)));
dd=;

if value dd=0, the column A and column B should be the same.

You can refer to:
http://www.originlab.com/doc/LabTalk/ref/Distance-func


Best regards!
Jason
OriginLab Technical Service

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