<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Le 24/11/2019 à 19:53, fujimoto2005 a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:1574621580901-0.post@n3.nabble.com">
      <pre class="moz-quote-pre" wrap="">Is it posible to get a 2-dimension matrix y(j,k) =Σ_i x(i,j,k) from 3
dimension hyper- matrix x(i,j,k) without using  k-loop?
If there is such a way, please teach me.</pre>
    </blockquote>
    <p><br>
    </p>
    <p><font size="-1"><tt>--> h = grand(4,3,2,"uin",0,3)</tt><tt><br>
        </tt><tt> h  = </tt><tt><br>
        </tt><tt>(:,:,1)</tt><tt><br>
        </tt><tt>   0.   0.   2.</tt><tt><br>
        </tt><tt>   2.   3.   3.</tt><tt><br>
        </tt><tt>   2.   1.   3.</tt><tt><br>
        </tt><tt>   1.   1.   1.</tt><tt><br>
        </tt><tt>(:,:,2)</tt><tt><br>
        </tt><tt>   0.   3.   1.</tt><tt><br>
        </tt><tt>   2.   0.   1.</tt><tt><br>
        </tt><tt>   3.   1.   3.</tt><tt><br>
        </tt><tt>   0.   2.   3.</tt><tt><br>
        </tt><tt><br>
        </tt><tt>--> matrix(sum(h,1),-1,size(h,2))</tt><tt><br>
        </tt><tt> ans  =</tt><tt><br>
        </tt><tt>   5.   9.   6.</tt><tt><br>
        </tt><tt>   5.   5.   8.</tt><tt><br>
        </tt></font><br>
      Regards</p>
  </body>
</html>