<div><div dir="auto">May not be possible. See <div><a href="https://stackoverflow.com/questions/16105548/4-dimensional-matrix-in-armadillo">https://stackoverflow.com/questions/16105548/4-dimensional-matrix-in-armadillo</a></div><div dir="auto"><br></div><div dir="auto">Avi</div></div><br><div class="gmail_quote"><div>On Tue, Apr 17, 2018 at 8:38 PM Shaami <<a href="mailto:nzshaam@gmail.com">nzshaam@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div><div><div>Dear Prof.<br><br></div>I am not finding how to introduce a 4-dimensional array using RcppArmadillo. Could you please provide a simple example of introducing a 4-dimensional array and how to store the values in it? For example, exactly the same as  I did for the cube as follows<br><br><br>arma::cube X(N, M, Q, fill::zeros);<br><br>  for(int n=0; n<N; n++) <br>    {<br>    for(int m=0; m<M; m++)<br>      {<br>        for(int q=0; q<Q; q++)<br>         {<br></div>            X(n, m, q) + = n+m-q<br>         }<br>     }<br>   }<br><br></div>Thank you<br><br></div>Shaami<br></div>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Sent from Gmail Mobile</div>