I have a for loop that runs through .tif files. Within the for loop there are more for loops. I want to speed up this code because it takes a very VERY long time to run on even one .tif file. I wanted to use multithreading or parallel threading, however the parfor command that comes with the parallel toolbox in matlab cannot be used on my for loops. Parfor cannot be used because we iterate through files in the first loop, and the following loops are order dependent. We need it to go consecutively, so parallel threading is not going to work. Is there any other way to use multithreading in these scenarios? Even a way to use mutlithreading in the first for loop (the one that runs through images - parfor won't work because the for loop is not an increasing integer) would speed it up by doing multiple images at once.
Any help is greatly appreciated, thank you!