How can I save matrix to .txt file?
Show older comments
I have numerical matrix size of 64*60 and I like to save it to .txt file. How can I do it as easy as possible? without repeating %d with fprintf?
Accepted Answer
More Answers (2)
Sudhir Rai
on 17 Nov 2020
4 votes
Use this to get perfect matrix in .txt
X = rand(64,60)
save ('filename.txt', 'X', '-ascii')
Almuthana Alharbi
on 11 Apr 2018
0 votes
Thanks
Categories
Find more on Characters and Strings 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!