Reputation: 3205
Say I have a matrix
test =
{
[1,1] = one
[1,2] = two
[1,3] = three
}
I want to write it into a file. I do
`save myfile.txt test`
But when I open the file with Notepad++ for example, I get MATLAB 5.0 MAT-file, written by Octave 3.2.4, 2013-07-11 15:23:20 UTC
and then a bunch of NUL
SOH
BS
ACK
, etc...
Is there a way to just write the matrix into a plain text file so that it would look like:
1
2
3
Upvotes: 0
Views: 1280
Reputation: 13876
Use the -ascii
flag. From the save
documentation:
-ascii
Save a single matrix in a text file without header or any other information.
Upvotes: 2