6 pure module function linspace(start, finish, npts) result(x)
8 real(real64),
intent(in) :: start, finish
9 integer(int32),
intent(in) :: npts
10 real(real64),
allocatable,
dimension(:) :: x
18 dx = (finish - start) / (npts - 1.0d0)
26 pure module function logspace(start, finish, npts) result(x)
28 real(real64),
intent(in) :: start, finish
29 integer(int32),
intent(in) :: npts
30 real(real64),
allocatable,
dimension(:) :: x
34 real(real64) :: dx, exponent
38 dx = (finish - start) / (npts - 1.0d0)
41 x(i) = 1.0d1**exponent
42 exponent = exponent + dx
47 pure module function meshgrid(x, y) result(xy)
49 real(real64),
intent(in),
dimension(:) :: x, y
50 real(real64),
allocatable,
dimension(:,:,:) :: xy
53 integer(int32) :: i, nx, ny
58 allocate(xy(ny, nx, 2))