Apply function over all 3rd dimension
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Diego Makasevicius Barbosa
le 2 Fév 2016
Commenté : Diego Makasevicius Barbosa
le 2 Fév 2016
Hello all, Is there a way to apply a function (eg rank) over all 3rd dimension without loop or reshape a matrix?
Thank you in advance!
Diego Makasevicius
0 commentaires
Réponse acceptée
James Tursa
le 2 Fév 2016
Depends on the specific function. For 'rank' you will in general need a loop so that the individual 2D matrices can be passed to the function. If you are using gpuArray types then you could use 'pagefun' for certain functions that are m-code (not built-in or mex).
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Parallel Computing Fundamentals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!