How to compare two matrices, row by matrix using the GPU
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
kurio curio
il 17 Mag 2020
Modificato: kurio curio
il 17 Mag 2020
Hi,
given the two matrices A and B I have to create the result matrix, in it we have 1 if the number of the matrix A is contained in the matrix B. We compare the whole matrix A with the elements of each row of the matrix B.
I managed to get the result with cycles but I would need a more efficient function, able to run with the GPU because the rows of the matrix B could be really many.
I thank in advance who will be kind enough to help me.
Thanks
Kurio
0 Commenti
Risposta accettata
David Hill
il 17 Mag 2020
Not sure if something like this would work for you.
arrayfun(@(x)ismember(a,b(x,:)),1:size(b,1),'UniformOutput',false);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su GPU Computing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!