SHAREDMATRIX Allows any Matlab object to be shared between Matlab sessions (w/o using file I/O).
Updated 8 Jun 2011

View License

SHAREDMATRIX Allows any Matlab object (e.g., struct, nd-cell, nd-matrix, sparse matrix) to be shared between multiple Matlab sessions without resorting to file I/O. The Matlab sessions must have access to the same shared memory resources, i.e., the processes are on the same physical system. This program uses shared memory functions specified by POSIX and in doing so avoids disk I/O for sharing. The program should work on any Linux variant but was only tested on Ubuntu.

*UPDATE: Thanks to contributor Andrew Smith, we now support Windows through the Boost InterProcess library. The windows version has not been tested by the first author.

% For example, assuming you have data X:

clear X;
% do something with X

For complete description please see my blog post:

Cite As

Joshua Dillon (2024). sharedmatrix (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on App Building in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!



Version Published Release Notes

No change to code. Updated icon only.

- Sharing of scalars is now explicitly not supported (Alen Wu).
- Windows version clone open_or_create (Guy Katz).

Fixed regression bug: incorrect calculation of sparse matrix size (nzmax).

Thanks to contributor Andrew Smith, now support structs.

Various other minor bug fixes.

Added ipcs interface: whosshared.m

Corrected mishandling of sparse logical matrices.

updated description

updated description

1) fixed empty member bug
2) fixed install_sharedmatrix.m
3) updated/clarified documentation