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
 How multiply data with different x-axes?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Markus

Germany
29 Posts

Posted - 01/23/2004 :  02:37:55 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi everyone,

is there any build -in function to multiply two spectral datasets (y-data) having different x-axes?
Doing it by hand would mean to interpolate at least one of the two (if the x-axes of the second is equidistant, otherwise interpolate both) and then multiply them.

Thanks
Markus

rlewis

Canada
253 Posts

Posted - 01/23/2004 :  03:44:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The following LabTalk commands should do the trick ...

Dataset1 +-O Dataset2;
Dataset1 --O Dataset2;
Dataset1 *-O Dataset2;
Dataset1 /-O Dataset2;

Go to Top of Page

Markus

Germany
29 Posts

Posted - 01/23/2004 :  07:06:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank you, I tried but did not succeed. Maybe I made some syntax-errors. For Dataset1 I used Data1_B (with the corresponding x-values in Data1_A), Dataset2 was Data2_B (with the corresponding x-values in Data2_A). And the O is the Letter O not the number 0.
Nothing happened when I executed the script.
What should it do?
I could not find this notation in the Labtalk-help.

Thanks
Markus

Go to Top of Page

greg

USA
1379 Posts

Posted - 01/23/2004 :  11:29:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This notation is mentioned in the LabTalk manual, but some clarification is in order.


    [*]The operation works on Y data, but uses the X information.
    The X domain of the first operand defines the limits of the calculation.
    [*]This is an assignment operator.
    The operation is performed using the second dataset and the results are put in the first dataset.
    So if you need to preserve the first dataset, you should copy it and use the copy. Both the X and Y data must be copied.
    [*]The operation uses interpolation.
    Since a particular X may not exist in the second operand, Origin will interpolate a Y value for the calculation. If the datasets are NOT plotted, then linear interpolation is used. If the datasets ARE plotted as Line or Line+Symbol, then Origin will interpolate according to the connection method used. This can be particularly useful for the Spline connection for example.


So, the result of:

data1_b +-O data2_b; // Add Data2_B to Data1_B
data1_b --O data2_b; // Subtract Data2_B from Data1_B
data1_b *-O data2_b; // Multiply Data1_B by Data2_B
data1_b /-O data2_b; // Divide Data1_B by Data2_B

would be to (ultimately) restore data1_b to its original values - with the exception of any missing values caused by division by zero.

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