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
 LabTalk Forum
 Mapping two datasets with differently scaled x

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
Phillip T. Posted - 02/24/2020 : 03:23:56 AM
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
4   L A T E S T    R E P L I E S    (Newest First)
aplotnikov Posted - 03/13/2020 : 04:25:05 AM
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);

dalim199 Posted - 03/13/2020 : 01:56:36 AM
Thank for this post.
Phillip T. Posted - 02/25/2020 : 04:05:15 AM
Very nice thank you.
yuki_wu Posted - 02/24/2020 : 10:11:16 PM
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

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