Borrar filtros
Borrar filtros

Apply function over all 3rd dimension

2 visualizaciones (últimos 30 días)
Diego Makasevicius Barbosa
Diego Makasevicius Barbosa el 2 de Feb. de 2016
Comentada: Diego Makasevicius Barbosa el 2 de Feb. de 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

Respuesta aceptada

James Tursa
James Tursa el 2 de Feb. de 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).

Más respuestas (0)

Categorías

Más información sobre Parallel Computing Fundamentals en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by