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
 Forum for Origin C
 Subtract Reference Data

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
Koguma Posted - 07/12/2006 : 2:56:45 PM
Origin Version : Origin 7.0
Operating System: Windows XP Professional Service Pack 2

Hi! I am a Brazilian student and a iniciant im Origin .
I need to subtract 2 worksheets, as the same way that "Subtract Reference Data" do.
for example:

Worksheet 1

-10,328 -4,06987
-8,4 -4,07602
-6,471 -3,9386
-4,543 -2,36346
-2,614 3,68485
-0,686 14,46679
1,243 22,8573
3,171 21,63493
5,1 13,3203
7,028 5,31742
8,957 0,52841
10,885 -2,03736
12,813 -3,35818
14,742 -3,93245
16,67 -4,08012
18,599 -4,06576
20,527 -4,05756
22,456 -4,08012
24,384 -4,10473
26,313 -4,10678

worksheet 2

808,391 0,24363
1807,52595 -0,00219

There is some method in the Origin C to do this?
I try to do this:

Dataset d1(wks1.Columns(0));
Dataset d2(wks3.Columns(0));
d2=d1;
Dataset d3(wks2.Columns(1));
Dataset d4(wks1.Columns(1));
Dataset d5(wks3.Columns(1));
d5=d4-d3;

Subtract wk1 to wks2 and place the result in wks3, but doesnt work!
The number of rows may be the problem?
Please help me i dont think in any solution! Please forgive my English too! Thanks!
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 07/12/2006 : 7:57:12 PM
Probably easiest with the LabTalk vector subtraction method used by Subtract Reference Data because it interpolates automatically. See Help > Programming > LabTalk Language Reference > Overview... > Performing Calculations > Vector Calculations > Calculations Using Interpolation.

Dataset d1(wks1.Columns(0));
Dataset d2(wks3.Columns(0));
d2 = d1;
Dataset d3(wks2.Columns(1));
Dataset d4(wks1.Columns(1));
Dataset d5(wks3.Columns(1));
d5 = d4;
LT_execute(d5.GetName() + " --O " + d3.GetName());

Mike Buess
Origin WebRing Member

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