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
 Origin Forum
 Subtracting a "smoothed" curve from another
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

dave_phony

Canada
Posts

Posted - 07/07/2004 :  4:30:55 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello all,

I have 2 different x-y data sets that don't have the same dx increments and therefore don't have the same x values. The total x interval is roughly the same however. I can plot these two curves on the same graph and Origin will smooth them both. What I want to know is what is the simplest way (if there is a way!) to subtract one "smoothed" curve from the other (and also "recuperate" the data from this new curve)?

Thanks alot - any help would greatly be appreciated....

Dave

easwar

USA
1964 Posts

Posted - 07/08/2004 :  09:27:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

One simple way to subtract one curve from another (even with varying x values for both curves) is to plot them together, and with the graph active, use the Analysis->Subtract menu item. Then select "Reference Data" from the submenu. In the dialog that comes up, move in one curve name into Y1 and the other into Y2. This will result in Y1 being replaced by (Y1-Y2), where Origin will interpolate the values of Y2 for corresponding X values of Y1, and then do the subtraction.

There are other programmatic ways to do this using either LabTalk or Origin C. What did you mean by "recuperating" the data?

Easwar
OriginLab

Go to Top of Page

dave_phony

Canada
Posts

Posted - 07/08/2004 :  12:08:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you Easwar,

This was, in effect, really simple to do. I am new to Origin, so forive me! What I meant by "recuperating the data" was that I was wondering if there was a way to see the new data afterwards from this new curve - but I now see that this data gets put in the "Y2" column.
This leads me to ask, is there a way to generate this new curve without losing the original Y2 data in curve in order to display the 2 original curves plus their "difference curve"?? (I guess you could make 2 copies of Y2 initially but maybe there's a simpler trivial answer).

Thanks again!
Dave
Go to Top of Page

easwar

USA
1964 Posts

Posted - 07/08/2004 :  4:00:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Dave,

With the menu item I suggested, if you want to keep the original data, you need to first duplicate one of the curves.

Programmatically, this can be done more flexibly. If you want to try LabTalk or Origin C to do this, you can post in the Programming forums for help.

Easwar
OriginLab

Go to Top of Page

dave_phony

Canada
Posts

Posted - 07/08/2004 :  4:54:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks again Easwar!

Dave
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