Hello,
As per my understanding, you are facing an error while using "parfor" loop and reading the parent of a graphical object. The error occurs because accessing the properties of the parent figure or working with graphical objects directly is not supported within "parfor" loops.
When using "parfor" in MATLAB, graphical objects behave differently than in a regular "for" loop due to the nature of parallel computing. In a "parfor" loop, MATLAB creates separate worker instances that execute the loop iterations independently and in parallel. Each worker has its own workspace and does not have access to the GUI.
You can refer to the below documentation to understand more about "parfor" loops.