how can I write a parallel code in Matlab?
Mostrar comentarios más antiguos
hi every one, can you help me to write a program with parfor and compare the time consumed in comparing with for? The code is: matlabpool open local 7 tic parfor i = 1:100000 k=i end toc matlabpool close Elapsed time is 1.846197 seconds.
tic,for i = 1:100000 k=i end toc Elapsed time is 0.000640 seconds.
Respuesta aceptada
Más respuestas (1)
Edric Ellis
el 4 de Ag. de 2014
0 votos
Ideally, you should not open and close the pool for timing purposes - it's intended that you keep the pool open.
Categorías
Más información sobre Parallel Computing Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!