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
 Fortran to LabTalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

brenowit@a

USA
1 Posts

Posted - 04/18/2003 :  2:05:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi, I am trying to convert this fortran language defined function that fits two straight lines into a x intercept. I was wondering if you can help with this. The code for fortran is below.

cvaxFTN7X,L
Function FX (ANS, X, Y, IERR, N)

REAL ANS (4),X(3)
real M1,m2,B1,b2,xbr

M1 = ANS (1)
B1 = ANS (2)
m2 = ans (3)
b2 = ans (4)

xbr = (b2-b1)/(m1-m2)

IF (X(1).LT.xbr) then
FX = B1 + M1 * X(1)
ELSE
FX = b2 + m2 * X(1)
ENDIF

RETURN
END
  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