[英]octave/matlab: write file as plain text
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... 但是当我用Notepad ++打开文件时,我得到MATLAB 5.0 MAT-file, written by Octave 3.2.4, 2013-07-11 15:23:20 UTC
,然后是一堆NUL
SOH
BS
ACK
等。 。
Is there a way to just write the matrix into a plain text file so that it would look like: 有没有办法将矩阵写入纯文本文件,使其看起来像:
1
2
3
Use the -ascii
flag. 使用-ascii
标志。 From the save
documentation : 从save
文档 :
-ascii -ascii
Save a single matrix in a text file without header or any other information. 将单个矩阵保存在文本文件中,不带标题或任何其他信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.