I am writing code to share with other researchers. I want to use the parallel processing toolbox for speed savings. Other researchers don't have the parallel processing toolbox.
Is there a way for everyone to use the same function? That is, skip or disable the parallel processing functions, if that toolbox is not available? Right now, my only option is to have two versions of every function, which encourages programming errors. When I was programming in C or C++, I would have solved this problem with compile flags. I tried an input flag, but this fails. MATLAB won't run a function that includes parfor if the parallel processing toolbox is missing.