LogSpace
Returns a vector of logrithmically spaced entries.
a = logspace(a, b, N, endPoint, base)
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE
MODULE PURE FUNCTION Logspace(a, b, N, endPoint, base) RESULT(Ans)
REAL(REAL32), INTENT(IN) :: a
!! left end of 1D domain
REAL(REAL32), INTENT(IN) :: b
!! right end of 1D domain
INTEGER(I4B), OPTIONAL, INTENT(IN) :: N
!! Number of points including a and b
LOGICAL(LGT), OPTIONAL, INTENT(IN) :: endPoint
!! default is true, if true then include endpoint
INTEGER(I4B), OPTIONAL, INTENT(IN) :: base
!! default is 10
REAL(REAL32), ALLOCATABLE :: ans(:)
!! Number of nodes in mesh
END FUNCTION Logspace
END INTERFACE
program main
use easifemBase
implicit none
call display(&
& logspace(a=1.0, b=10.0, N=10, endPoint=.true., base=10), &
& "ans:", full=.true. )
end program main
See results
results
ans:
-----------
1.00000E+01
1.00000E+02
1.00000E+03
1.00000E+04
1.00000E+05
1.00000E+06
1.00000E+07
1.00000E+08
1.00000E+09
1.00000E+10