Apply function over all 3rd dimension
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
James Tursa
2016-2-2
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).
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mathematics and Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!