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
 "Compress" column B to length of columb A
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peterrrrp

Germany
1 Posts

Posted - 11/08/2016 :  09:51:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:

What I've done so far:

-New graphic: B(Y1), C(Y1) and drag them into Layer 1
-new Layer 2: mark E(Y2), drag into Layer 2

result so far:


But I want it like this (badly photoshopped):


check here for the columns:


How I'm able to "compress" the temperature exactly from line "0" to line "918640" so the "break" is exactly on top of each other (tempereature peak and "normal" peak)



Origin 2016G (64bit)

lkb0221

China
497 Posts

Posted - 11/08/2016 :  4:07:53 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You can just scale your X data by the ratio of the small range and the large range.

Zheng
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 11/08/2016 :  4:27:56 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi peterrrrp,

If I understood correctly that you want to "normalize" the X values of one plot to fit them to a range of another plot, maybe you can try the following script on the original worksheet:
////////////////////////////////
  refXcol=1; //X column number as reference
  targetXcol=3;  //X column number to be normalized
  sum(wcol(refXcol));
  mi1=sum.min;  //reference's minimum;
  ma1=sum.max;  //reference's maximum;
  mr1=ma1-mi1;  //reference's range;
  sum(wcol(targetXcol));
  mi2=sum.min;  //target's minimum;
  ma2=sum.max;  //target's maximum;
  mr2=ma2-mi2;  //target's range;
  r12=mr1/mr2;  //ration o ranges
  wcol(targetXcol)=(wcol(targetXcol)-mi2)*r12+mi1; //normalize
////////////////////////////////
Changing the column numbers appropriately, could you please try it?

--Hideo Fujii


Edited by - Hideo Fujii on 11/08/2016 4:28:53 PM
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