Learn R Programming

RPMG (version 2.2-7)

meshgrid: Create a mesh grid like in Matlab

Description

Creates 2D matrices for accessing images and 2D matrices

Usage

meshgrid(a, b)

Value

x

length(y) by length(x) matrix of x indicies

y

length(y) by length(x) matrix of y indicies

Arguments

a

x vector components

b

y vector components

Author

Jonathan M. Lees<jonathan.lees@unc.edu>

Details

returns outer product of x-compnents and y-components for use as index arrays

Examples

Run this code

meshgrid(1:5, 1:3)


Run the code above in your browser using DataLab