How do I make this 3D grid code use all 4 cores in of my CPU

The file attached is a function for creating a 3D grid based on user input of x, y, and z ranges.
grid3D(xmin, xmax, ymin, ymax, zmin, zmax)
I want to make my CPU use all 4 cores. For ex. on one core calculate x matrix, one for y, and one for z etc. I tried parfor but it gave an error of "the variables can not be classified". I read the document but couldn't find a way to fix it.
Can you please suggest a way to run parfor for the 'i' loop or any other way to get my CPU to use all 4 cores.
Thanks!

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 1 de En. de 2015

Editada:

el 1 de En. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by