Suppose I have 20 Matrices: Mat, Mat,...,Mat. What is the best way to export (and Import) this set of Matrices in a file? How can I do that? (may be any format, for example: csv). Thanks.
closed as off-topic by MarcoB, Carl Lange, m_goldberg, bbgodfrey, Alex Trounev Mar 12 at 21:23
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – MarcoB, Carl Lange, bbgodfrey, Alex Trounev
You can use the
Export to save the set of objects. Let's say we have ten 2x2 matrices inside
Make an exporting function
ef and sequentaly apply it for elements of
SetDirectory["your path"]; ef=Export[ToString[#[[1,1]]]<>".dat",#]& ef/@a
It will give you ten dat-files with 2x2 matrices.
Of course, the simpler way is to export
a as one file: