Parfor --> Undefined function 'colon' for input arguments of type 'distributed'.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am new with the parallel toolbox and I need some help. I have a code that looks like this
function A = main_function(..)
parfor c1=1:m
for c2=1:n
if c2 >= c1
A(c1,c2,:)= my_function(..);
end
end
end
end
I get an error that says
Error using internal_compute_H_9int_vect_simplified (line 141). The source code (C:\Users\..\main_function.m) for the parfor-loop that is trying to execute on the worker could not be found.
Caused by:
Undefined function 'colon' for input arguments of type 'distributed'.
Error using remoteParallelFunction (line 84)
Worker unable to find file.
Undefined function 'colon' for input arguments of type 'distributed'.
At first I thought that the problem was the ":" in the matrix A, but then I tried this simple code
m = 3;
n = 3;
H = zeros(2,2,3);
beta =rand(3,1);
parfor c1=1:m
for c2=1:n
H(c1,c2,:) = 3*rand(3,1);
end
end
and it works.
What is the problem? Is related to the location of the function "main_function", to the matrix A , or to what I do in the funtion "my_function" ? What "distributed" actually means here?
Best
3 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Parallel Server dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!