Element by element comparision and vector duplication into matrix

Element by element comparision and vector duplication into matrix

Hi all,

could you help me with the following problem.

1.

I would like to compare matrix A and B (both with same dimension), element by element, and produce a matrix C such that

C(i,j) = 1, if A(i,j) >= B(i,j) and C(i,j)=0 if A(i,j) < B(i,j)

2.

How can I duplicate a 1-dimensional vector with m elements n times to make it a m x n matrix?

Thank you very much

1 Beitrag / 0 neu
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.