Hi!

I have a matrix called M with dimension (586,100,100). I would like to split
and save this into 586 matrices with dimension 100 by 100.
I have tried the following for loops but couldn't get it work..

l<-dim(M)[1]
for (i in (1:l)){
save(M[i,,],file = "M_[i].img")
}

Can somebody help me with this? Thanks!

Hana Lee

	[[alternative HTML version deleted]]

