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
 how to obtain extrapolation graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

umira

Malaysia
1 Posts

Posted - 04/11/2017 :  11:24:59 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:


hi.can someone explain about how to obtain extrapolation graph in originlab for more details. i've seen few tutorial but still didn't get it.i want to obtain the graph as below


please help me.i want to use it in my project

Hideo Fujii

USA
1582 Posts

Posted - 04/12/2017 :  09:20:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi umira,

How about the following snippet? Having the curve's XY in the first two columns, and X position of
your desired contact, it uses the differentiate x-function on the main curve, interp1 x-function to
interpolate the main and derivative curves. You can modify as you need, such as for smoothing options, etc.

/////////////////////////////////////////////////
mybook$=%H;  //Workbook name
differentiate -r 2 iy:=[mybook$]1!(A,B);  //Get derivatives
interp1 -r 2 ix:=[mybook$]1!C iy:=[mybook$]1!(A,B);  //interp original data
interp1 -r 2 ix:=[mybook$]1!C iy:=[mybook$]1!(A,D);  //interp derivative data
myx=col(3)[1];  //Contact x
myy=col(5)[1];  //Contact y
myslope=col(6)[1];
myxintercept=myx-myy/myslope;
myyintercept=myy-myx*myslope;
worksheet -a 2;   //add col(7) and col(8) for tangent line
range slopex=col(7);
range slopey=col(8);
wks.col7.type=4;  //set col(7) as X
plotxy [mybook$]1!col(2) plot:=200; //Line plot col(2)
//y1=0;   if you want to have a predetermined bottom
//x2=10;  if you want to have a predetermined right-end
slopex[1]=(y1-myyintercept)/myslope; //x of frame bottom
slopey[1]=y1;  //y of frame bottom
slopex[2]=myx;
slopey[2]=myy;
slopex[3]=x2;  //x of right end of graph frame
slopey[3]=slopex[3]*myslope+myyintercept;  //y at right end
range sline=[mybook$]1!col(8);
layer -i202 sline;  //add Line+Symbol slope plot
slopey[C]$= slope: $(myslope) 
Y intercept: $(myyintercept) 
X intercept: $(myxintercept) 
Bottom X: $(slopex[1])
Bottom Y: $(slopey[1]); //Comment on parameters
/////////////////////////////////////////////////



Hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 04/12/2017 10:36:51 AM
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