I am not a Matlab user, but I have a Matlab data file (.MAT file) from the online supplemental information of a Proceedings of the National Academy of Sciences (PNAS)article. The file is about half a megabyte.
I would like to convert this file to an ASCII format, so I can read it. Is there a utility that would do this conversion? Or could somebody do the conversion for me? Any help would be greatly appreciated.
Thanks,
Tom
> I am not a Matlab user, but I have a Matlab data file (.MAT file) from
> the online supplemental information of a Proceedings of the National
> Academy of Sciences (PNAS)article. The file is about half a megabyte.
> I would like to convert this file to an ASCII format, so I can read it.
In the general case, .mat files could contain objects for which there is
no ASCII representation. This includes graphics objects and some kinds
of objects having to do with object-oriented programming (as the process
of reading the object is allowed to trigger changes in the object.)
If the data is numeric, double precision, and has more than about two
columns, representing it _exactly_ in ASCII becomes tedious to read...
up to 58 columns per value. However, given the details of a particular
rounding scheme for the program you would want to read it in with, this
could be reduced to 18 digits of mantissa each, I believe. Representing
it in hex can be more compact and precise.
If the data is numeric and one or two dimensional, there are matlab
routines that will format the ASCII such that the resulting ascii can be
read by matlab to produce a matrix of the same size with the elements in
the same order. Extending that to 3 dimensions is not so bad. Going to 4
or more dimensions gets messy to represent as ASCII in a form that would
be read back in to form the original matrix.
Perhaps you could tell us a bit more about the data?
I believe that the data is a 2D array, approximately 200 X 350 of real numbers. I do not known the precision. There is probably some header text for each of the 342 columns.
Tom
Walter Roberson <robe...@hushmail.com> wrote in message <hYgKo.3298$%83....@newsfe16.iad>...
> I am not a Matlab user, but I have a Matlab data file (.MAT file) from the online supplemental information of a Proceedings of the National Academy of Sciences (PNAS)article. The file is about half a megabyte.
Which article?
Assuming that the author agrees, a conversion should be legal. So if you tell where to find the data, someone could convert it for you.
I personnally prefer the article "High income improves evaluation of life but not emotional well-being ". Perhaps I'm applying as a volunteer for some deeper studies.
Kind regards, Jan
The file that I am trying to translate is in the supplementary material. The supplementary material is in the form of a zipped file that is the target of the folllowing link...
http://www.pnas.org/content/106/51/21527/suppl/DCSupplemental
The zipped file contains about a dozen matlab files. The one I am interested in is called "magicc_scenarios.mat"
The work "magicc" in the filename is an acronym for "Model for the Assessment of Greenhouse gas Induced Climate Change"
I could also simply email the "magicc_scenarios.mat" file, which I have already unzipped.
Thanks for any help you can provide.
Tom
"Jan Simon" <matlab.T...@nMINUSsimon.de> wrote in message <idecqs$aen$1...@fred.mathworks.com>...