Can some one tell me how to export a matrix containing numerical
values in a matrixmarket file.
It is called .mtx format. mathematica documentation supports it but I
cant export using the export command.
Also how to import .mtx files in mathematica.
In general the import export documentation of mathematica does not
have much examples and for several format almost no documentation. I
hope this will improve in the next versions.
regards,
pratip
>Dear Group,
>
>Can some one tell me how to export a matrix containing numerical
>values in a matrixmarket file. It is called .mtx format. mathematica
>documentation supports it but I cant export using the export
>command. Also how to import .mtx files in mathematica.
To Export:
Export["test", RandomReal[1, {5, 5}], "MTX"]
To Import:
Import["test", "MTX"]
For more information about Export/Import in matrixmarket format goto:
ref/format/MTX
in the Documentation Center
It really doesn't seem to be that difficult. Just typing
Export[ "C:\\Documents and Settings\\Sjoerd\\Desktop\\Ape.mtx", {{0.,
3.}, {5., 0.}}]
generates an mtx file on my desktop. All I needed was actually in the
documentation and was easy to find (that's not always the case, but
here it was).
Relevant doc pages:
- ref/format/MTX
- Export
Cheers -- Sjoerd