Displaying 1 result from an estimated 1 matches for "342058".
Did you mean:
340058
2008 Oct 30
2
request: How to combine three matrices in the desired form
Dear R-friends
I have three matrices e.g. var <- matrix(c(4,4,4,4,0,4,4,4,0,3,3,0),nrow=4); val <- matrix(c(0.6,0.6,0.6,0.6,0,1.6,1.6,1.6,0,4.9,4.9,0),nrow=4); nod <- matrix(c(-1,-1,1,1),ncol=1)
> var
[,1] [,2] [,3]
[1,] 4 0 0
[2,] 4 4 3
[3,] 4 4 3
[4,] 4 4 0
> val
[,1] [,2] [,3]
[1,] 0.6 0.0 0.0
[2,] 0.6 1.6 4.9
[3,] 0.6 1.6