portable matfile exporter (in C)
by Malcolm McLean
19 Feb 2010
(Updated 03 Mar 2010)
Export matfiles from C programs, regardless of the platform the file is running on.
|
Watch this File
|
| File Information |
| Description |
Sometimes it is convenient to export data as a binary matfile, so that it can be manipulated in Matlab. So here are two convenience functions to write matrices and strings. They don't rely on any Matlab libraries being available.
If your floating point unit is not ieee754 then the bits cannot simply be written out, so a portable floating point save routine has been provided. It handles NaNs, infinity, and denormalized numbers. So you can export mat files directly from a supercomputer running weird hardware, and you can write ANSI C programs knowing they will work correctly on every ANSI C compiler. |
| MATLAB release |
MATLAB 7.9 (2009b)
|
| Other requirements |
ANSI C compiler. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 03 Mar 2010 |
Bug taken out. File now opened in binary mode. |
|
Contact us at files@mathworks.com