how to separate matrices in an array?
<p>I want to apply a function for each four matrices, for example start from 1:4 then 5:8 then 9:12 ;13:16,17:20,21:24 and so on in my real data</p>

<pre><code> k = 24; n=3; m = 4
 ary=array(1:24, c(n,m,k))

 str(ary)
 int [1:3, 1:4, 1:24] 1 2 3 4 5 6 7 8 9 10 ...
 for each four matrices in ary fun {.........}
</code></pre>