Hi,
I have a function of the form(a simplificated example):
function evalf(f,x)
interface
function f(y) result(f_out)
real :: y
real :: f_out
end interface
real :: x
[....]
end function
How can I use this function evalf inside of a bucle for diferent
functions f(ex.: f1,f2,f3,f4,f5)
The following doesn't work:
[...]
integer :: i
character(len=1) :: num(5)= (/'1','2','3','4','5'/)
real :: z(5)
do i=1,5
z(i)=evalf('f'//num(i),x)
enddo
[...]
Matlab has the function eval() to do this task of evaluation.
Is there a similar way to do it under FORTRAN 90?
--
--------------------------------
DAVID LEAL
Universidad Carlos III de Madrid
Office: 10.1.02
Tel: (34-1)-624.93.14
Fax: (34-1)-624.98.49
E-mail : [log in to unmask]
http://jupiter.uc3m.es/~david/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|