In a class I am using a private property A, an NxN matrix, to store data that is expensive to compute and may be used many times during the lifetime of the object. I was excited to learn about the Transient attribute which seems perfect for this type of property:
in the object temporarily as an intermediate computation step, or for
Easy and elegant solution but a method fails with a "array out of bounds" error when a parallel pool is available. I think the reason is clear enough: MATLAB calls save/load behind the scenes to send my object to workers in the parpool.
- Am I right about the cause and is this a documented limitation of the Transient attribute?
- Is there a workaround that doesn't require the property A to be recomputed by each worker?