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

1 view (last 30 days)
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!

Answers (0)

Categories

Find more on Graphics Objects in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!