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
 Dataset sizes and operations between them
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

toldenxi

1 Posts

Posted - 10/06/2000 :  8:11:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have two datasets that cover the same "X" range but do so with a different number of data points, (specifically two sets of data that start and end at the same time but one has more samples in that time than the other)and I want to divide one set by the other. When I do this in a plot window everything works because apparently one of the datasets is interpolated in order to find two "Y" values for the corresponding "X" value. This works fine except that one of my datasets is overwritten with the result which I don't want. When I did the division in the middle of a script (using an assignment statement to put the result in a new column ie Data2_b=Data1_b/Data1_c) by the dividing the larger set by the smaller set the result was truncated to the number of data points of the smaller dataset losing information and shifting the data. What suggestion does anyone have for doing this division accurately and simply in a script. I have thought of some elaborate work arounds but there must be a simple answer.

Thanks

Mike Buess

USA
3037 Posts

Posted - 10/06/2000 :  12:59:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Why not just copy both data sets from Data1 to Data2 and divide them from there?

Data2_b=Data1_b;
Data2_c=Data1_c;
Data2_b/=Data2_c;

Truncation will occur in the Data2 worksheet, but the original data in Data1 won't be touched.

-Mike

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