meshgrid Function

public pure function meshgrid(x, y) result(xy)

Constructs two matrices (X and Y) from x and y data arrays.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:) :: x

An M-element array of x data points.

real(kind=real64), intent(in), dimension(:) :: y

An N-element array of y data points.

Return Value real(kind=real64), allocatable, dimension(:,:,:)

An N-by-M-by-2 array containing the x data matrix on the first page of the array, and the y data matrix on the second page.


Contents