mat_2_arr | R Documentation |
Takes a matrix, (z_{ij})_{m \times n}
, pertaining to an image along with limits of the x
and the y
axis values.
Returns a rank-3 array, T_{m,n,p}
, which is 3-slice, i.e. p \in \{1, 2, 3\}
.
T_{m,n,1}
is the matrix, (z_{ij})_{m \times n}
, while T_{m,n,2}
and T_{m,n,3}
are the X-natrix and the Y-matrix.
Please see details
mat_2_arr(mat, x.lim, y.lim)
mat |
The input matrix, |
x.lim |
The limits of the |
y.lim |
The limits of the |
For clearer picture of the structure of the rank-3 array T_{m,n,p}
, see image below.
Returns a rank-3 array, T_{m,n,p}
, which is 3-slice, i.e. p \in \{1, 2, 3\}
Chitran Ghosal
###Build the matrix
sines <- function(X, Y){
l1 <- 2*X +3*Y
l2 <- 4*X + 2*Y
return(sin(l1) + sin(l2))
}
M <- function_2D(X = seq(-10, 10, by = 0.01), Y = seq(-5, 5, by = 0.01), func = sines)
#Call the mat_2_arr function
arr <- mat_2_arr(mat = M, x.lim = c(-10, 10), y.lim = c(-5, 5))
#Plot the built array to verify
plot2D.arr(arr = arr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.