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
 Origin Forum
 How could draw a tangent of a curve

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
smartgong Posted - 04/29/2002 : 11:03:24 PM
I am a new user. could anyone give me some ideas?
7   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 06/09/2005 : 1:44:27 PM
The File Exchange now has a simple tangent add-on for Origin 7.5...

http://www.originlab.com/fileexchange/details.aspx?fid=106

Mike Buess
Origin WebRing Member
Mike Buess Posted - 06/07/2005 : 12:04:52 PM
I was referring to the post above yours which used tan(x). It does make a difference which units are used with trig functions.

Mike Buess
Origin WebRing Member
flirt Posted - 06/07/2005 : 11:34:39 AM
quote:

Is your angular unit properly set?

Tools > Options > Numeric Format > Angular Unit

Radian | Degree | Gradian



Do you mean I should change any type of X into angle?
I think the original author asked how to draw a tangential line on any curve, instead of overlapping a tangent function on the graph.
For example, i have a set of magnetic resistance data, want to draw two tangentical lines to decide the critical transition point, is there a method to do this?
Mike Buess Posted - 06/07/2005 : 10:19:55 AM
Is your angular unit properly set?

Tools > Options > Numeric Format > Angular Unit

Radian | Degree | Gradian

Mike Buess
Origin WebRing Member
flirt Posted - 06/07/2005 : 10:00:21 AM
Both not work for me
nulmiso Posted - 05/21/2002 : 8:34:06 PM
You can use 'Add Function Graph' feature.

Activate a graph window and select menu

Graph -> Add Function Graph

and type in "tan(x)" next to the label 'F1(x) = '.

Click 'ok' and you can get a tangent curve.
Jose Posted - 04/30/2002 : 3:46:14 PM
This will work with smooth data, and with points other than the first or the last of a dataset. It uses LabTalk to interactively calculate the tangent to a curve in a selected point.

1. Plot your dataset.

2. Copy the following code and paste it in the Script Window. (If the Script Window is not visible, active it by pressing ALT+3). Make sure that the Script Execution is checked (under the Edit menu in the Script Window).

3. Select all the pasted code and press ENTER to execute it. This will activate the Data Reader Tool.

4. Select one point of your dataset, or move left-right until you get it.

5. Press ENTER, and you'll have the tangent!


dotool 3; // Data Reader tool

def pointproc {

dotool -q;

%b=xof(%c); // X dataset for the current one
p1=(%C[index+1]-%C[index])/(%b[index+1]-%b[index]);
p2=(%C[index]-%C[index-1])/(%b[index]-%b[index-1]);
p=(p1+p2)/2;
c=y-p*x;
ftang(x)=$(p)*x+$(c);
layer -i200 ftang; // Plot as Line...
set ftang -c 4; // ...in blue
};


See the LabTalk help file for details about the dotool command and the PointProc macro to understand what I am doing here.

You can create a personal button to associate this script with. Consult the Origin help file, under any of these topics:

a. Script / Execution
b. Toolbar / Creating new

Jose Viņa, Origin WebRing member


Edited by - Jose on 04/30/2002 16:05:42

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