This is a helper class which can be used to create a shared object. A shared object works like normal data types but can create a alias variable or use as pass-by-reference argument.
a = shared([1:10]);
b = a;
b(10) = 0; %% a(10) will get 0 too.
inplace_incr(b) %% a(1:10) will be increased too.
a.data = a + 1;
Gary Lee (2022). Shared variable (https://www.mathworks.com/matlabcentral/fileexchange/24742-shared-variable), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!