My problem regards the usage of the Parallel Computing Toolbox functions, and in particular the variable transfer from client to workers when the "variable" is a Java object. I have experieced that, without multithreading, passing a Java object from a main script to a function is not a problem, while using (for instance) parfeval to implement multithreading, the object is not passed correctly resulting in the error "Attempt to reference field of non-structure array", because the object structure is lost. Something similar happens to me also trying to implement multithreading exploiting a parfor cycle, therefore I suspect it may be a generalized issue with the usage of Matlab multithreading tools. May I kindly have any clarification with this regards?
MATLAB: Parallel Computing Toolbox – Java object transfer from client to workers
java object transferParallel Computing Toolboxparfevalparfor
Best Answer