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 for Programming
 LabTalk Forum
 Mapping two datasets with differently scaled x
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Phillip T.

Germany
19 Posts

Posted - 02/24/2020 :  03:23:56 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

i have two data sets with time x-axis wich are differently scaled (1 datapoint per 0.5 and ca. 5 Seconds respectively).
I know there is a function in origin somewhere to scale the two datasets so they have the same amount of datapoints. However i cant find it.
Does anyone know where to find it in origin and how to implement it into code?

Thanks.

Regards,
Phillip

yuki_wu

896 Posts

Posted - 02/24/2020 :  10:11:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Phillip,

Do you want to perform interpolation? Please take a look at this page to see whether it can help:
https://www.originlab.com/doc/X-Function/ref/interp1

Regards, Yuki
OriginLab
Go to Top of Page

Phillip T.

Germany
19 Posts

Posted - 02/25/2020 :  04:05:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Very nice thank you.
Go to Top of Page

dalim199

USA
3 Posts

Posted - 03/13/2020 :  01:56:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thank for this post.
Go to Top of Page

aplotnikov

Germany
169 Posts

Posted - 03/13/2020 :  04:25:05 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Just read the topic "Interpolation" in the Labtalk Help - you can find some useful code samples there.
For instance, if linear interpolation sutisfies yor needs, you can use range variables as functions (copied from LT Help):
newbook;
wks.ncols = 4;
col(1) = data(1,0,-.05);
col(2) = gauss(col(1),0,.5,.2,100);
range rxy = (1,2);
rxy(.67)=;
range newx = 3; // Use column as X column data
newx = {0, 0.3333, 0.6667, 1.0}; // Create our new X data
range newy = 4; // This is the empty column we will interpolate into
newy = rxy(newx);

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