parfor for double iteration??
Mostrar comentarios más antiguos
Dear, I want to make a matrix G(m, n) as follows:
gamma = sqrt(sqrt(k/(E*I))); % gamma
G = zeros(length(x),length(qusi));
parfor n1 = 1:length(x)
for n2 = 1:length(qusi)
qua = gamma*abs(qusi(n2)-x(n1))/sqrt(2);
G(n1,n2) = (gamma/(2*k))*exp(-qua)*sin(qua + pi/4); % G(x,qusi)
end
end
However, the error come up as follows:
Error using testsquare_test (line 53)
Error: The variable G in a parfor cannot be classified.
See Parallel for Loops in MATLAB, "Overview".
I can't understand it. How should I do?
Could you please help me?
1 comentario
Khoo
el 23 de Ag. de 2013
Are you using the parallel computing from matlabpool? parfor is same as for-loop but it's in parallel computing.
Respuesta aceptada
Más respuestas (1)
Madhura Suresh
el 26 de Ag. de 2013
0 votos
You will need to slice/classify your variables in parfor loops. Look at this blog:
1 comentario
Jinsoo
el 4 de Sept. de 2013
Categorías
Más información sobre Gamma Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!