I have two armadillo matrices called A and B. I want to compare them element wise for finding the greater among the two elements at a time and store it back into A. So, in essence I want to do this:
arma::A = compareElements(arma::A, arma::B);
where function compareElements() basically looks at an element at index [i, j] of A and of B, and stores the greater element among the two at index [i, j] in A.
How do I achieve this functionality?
P.S. I'm new to Armadillo and I did go through its documentation but couldn't find anything useful so please be kind with me.
Aucun commentaire:
Enregistrer un commentaire