You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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.
For example:
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.
function inplace_incr(a)
a.data = a + 1;
end
Cite As
Gary Lee (2026). Shared variable (https://www.mathworks.com/matlabcentral/fileexchange/24742-shared-variable), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.0.0 (3.14 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
