MATLAB PARALLEL COMPUTING TOOLBOX - S Guida Utente Pagina 42

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 41
2 Parallel for-Loops (parfor)
2-14
B = @sin;
for ii = 1:100
A(ii) = B(ii);
end
A corresponding parfor-loop does not allow B to reference a function handle. So you can
work around the problem with feval:
B = @sin;
parfor ii = 1:100
A(ii) = feval(B,ii);
end
More About
“parfor Limitations” on page 2-11
“Sliced Variables” on page 2-27
Vedere la pagina 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 655 656

Commenti su questo manuale

Nessun commento