Learn R Programming

RPMG (version 2.2-7)

xyztoi: Matrix Index to Vector index

Description

Given ix, iy, iz index get I.

Usage

xyztoi(ix, iy,iz,nx, ny, nz)

Value

i

Index of matrix

Arguments

ix

index to col vector

iy

index to row vector

iz

index to (depth) layer vector

nx

number of blocks in x axis

ny

number of blocks in y axis

nz

number of blocks in z axis (layers)

Author

Jonathan M. Lees<jonathan.lees.edu>

See Also

itoxyz

Examples

Run this code

k = itoxyz(24, 6, 6, 1)
xyztoi(k$ix, k$iy, k$iz, 6, 6, 1)

nx = 20
ny = 20
nz = 40

k = itoxyz(2440, nx, ny, nz)
xyztoi(k$ix, k$iy, k$iz, nx, ny, nz )



Run the code above in your browser using DataLab