pagefun makes an error
Show older comments
The following code makes an error. How can I solve it?
b = gpuArray(repmat([1 2 ; 2 2; 4 3], 1, 1, 3));
pagefun(@norm, b)
Error using gpuArray/pagefun Function passed as first input argument contains unsupported or unknown function 'norm'.
What is the corrected code?
I am using Matlab 2014a, Parallel Computing Toolbox Version 6.4 and Gigabyte GTX750.
Thanks.
Accepted Answer
More Answers (1)
Joss Knight
on 27 Sep 2016
The corrected code is
ans = sqrt(sum(b.*b, 1));
Categories
Find more on GPU Computing in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!