What to use instead of FileOutputBuffer() for writing MAT - file in memory rather than on disk ?

1 view (last 30 days)
I am storing Mat file on database. There are hundreds of MAT file stored in database. On some days for data management I have to modify data in all of these Mat file. Currently system is downloading Mat file row by row into the disk to modify it and store it back on database. However for doing this I dont want Mat file to be created on the disk.
Is there a way to update these MAT files without downloading them on disk but to download them in temporary RAM memory and store it back to database after modification of its values ?

Answers (1)

Jason Ross
Jason Ross on 14 Mar 2013
You could look at using a RAM disk. This article explains it fairly well:
I assume you are using Windows, as you didn't specify what platform you are running on. There are also ways to create RAM disks on Mac and Linux, just google "ramdisk Linux" or "ramdisk mac os x" and there are plenty of instructions on how to set it up. You would need to tell MATLAB to download your files there.
Another way to improve disk I/O performance is to swap a spinning hard drive for an SSD, if the mat files you are downloading can't fit in the RAM disk mentioned above.


Find more on Software Development Tools in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by