problems with @arrayfun on GPU
이전 댓글 표시
Hi,
I am starting to using the arrafun function with GPU capabilities (I have an NVIDIA GeForce GTX 1650 with Max-Q Design).
I am following jsut the example from matlab website
R1 = rand(2,5,4,"gpuArray");
R2 = rand(2,1,4,3,"gpuArray");
R3 = rand(1,5,4,3,"gpuArray");
R = arrayfun(@(x,y,z)(x+y.*z),R1,R2,R3);
The code above runs perfectly in the Command Window, but if I want to run this from an script or live-script I get the following error:
Index exceeds the number of array elements. Index must not exceed 0.
Some hint what is happening?
댓글 수: 4
Bruno Luong
2022년 8월 2일
"The code above runs perfectly in the Command Window"
I bet not
christian Velasquez Javier
2022년 8월 2일
Walter Roberson
2022년 8월 2일
What name did you use for the script?
christian Velasquez Javier
2022년 8월 2일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Parallel and Cloud에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
