pagefun makes an error
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (1)
Joss Knight
il 27 Set 2016
The corrected code is
ans = sqrt(sum(b.*b, 1));
Categorie
Scopri di più su GPU Computing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!