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