<div dir="ltr"><div><div>Hi Rcpp Friends<br><br></div>I am posting again a question about the subject cited. I tried to search this problem but did not find. My question is why we cannot multiply element wise a subcube and a row of a matrix.<br><br></div>Any help would be appriciated. The following is sample code which is giving erros about the operand %.<br><br><div><br>#include <RcppArmadillo.h><br>using namespace Rcpp;<br>using namespace RcppArmadillo;<br>using namespace arma;<br>//[[Rcpp::depends(RcppArmadillo)]]<br>//[[Rcpp::export]]<br><br>arma::rowvec sub(arma::cube a, arma::mat b)<br>{<br>        rowvec x  =  a.subcube(0, 0, 0, 0, 2, 0)% b.row(0);<br>        return x;<br>}<br><br><br></div><div>Thank You<br><br></div><div>Shaami<br></div><div><br><br><br></div></div>