matlab - How to separate rows from a matrix? -


i have large matrix of size 16384 x 16. need obtain 512 x 512 matrix it. matrix should joined follows, l matrix of size 16384 x 16.by default l arranged below

    l = [l1          l2          l3          .          .          l32].  

i need obtain l such that,g(ie;the new 512x512 matrix)

     g = [l1l2...l32] 

here each l 512x16 matrix. tried 32x32 matrix , obtained results correctly not able larger matrix. should do? following code had used

       w1 = 32;        ans1 = l(1:w1,:);        ans2 = l(w1+1:end,:);        g = [ans1,ans2]; 

thanks.

one approach permute & reshape -

cutlen = 512;  %// "cut" after every cutlen rows g = reshape(permute(reshape(l,cutlen,[],size(l,2)),[1 3 2]),cutlen,[]); 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -