Building a matrix from submatrices

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Building a matrix from submatrices

AlanFarrington
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Building a matrix from submatrices

AlanFarrington
Solved with {}

MOMARM=matrix(sample(0:0, S*L^2, replace = TRUE), S, L^2)
SUBMOMARM=matrix(sample(0:0, S*L, replace = TRUE), S, L)
for(z in 1:L){
  for(i in 1:L){
  SUBMOMARM[,i]=SPAN/2-(SPACING[i]-SPACING[z])
MOMARM[,REFERENCE[z,i]]=SUBMOMARM[,i]}}