Thread Closed

Is there any command in Fortran that is similar to eval in MATLAB?

 
Share Thread Thread Tools
May26-10, 02:11 AM   #1
 

Is there any command in Fortran that is similar to eval in MATLAB?


Hello,

I am trying to write a Fortran subroutine to solve non-linear equations (given by external function fnxname) using Newton's method, where the derivative is given by finite difference calculation. How may I use the function in the program.

Suppose the desired function name is given by a string "fnxname", I cannot write fnxname(x), can I? In MATLAB, I may write eval(cat('fnxname','(x)')) or something like that. Is there a similar command in Fortran?

Replies would be much appreciated. Thank you very much.
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Galaxies fed by funnels of fuel
>> The better to see you with: Scientists build record-setting metamaterial flat lens
>> Google eyes emerging markets networks
Jun1-10, 07:17 AM   #2
 
Recognitions:
Science Advisor Science Advisor
You can either just put the function inside of the main program's file, or put the function inside of a MODULE and INCLUDE that module in the main program. Then you can simply call the function as normal.
Thread Closed

Tags
fortran, maths
Thread Tools


Similar Threads for: Is there any command in Fortran that is similar to eval in MATLAB?
Thread Forum Replies
open & read command in fortran Engineering, Comp Sci, & Technology Homework 0
Fortran DO command Programming & Comp Sci 4
MATLAB save command and transpose command Math & Science Software 4
while command in MATLAB Math & Science Software 4
MATLAB 'syms' command Math & Science Software 0