简体   繁体   English

如何在Matlab中写入文件?

[英]How do I write to a file in Matlab?

I have an mXn matrix of integers. 我有一个整数的mXn矩阵。 I want to write the matrix to a text file. 我想将矩阵写入文本文件。 I also want to read the file later and assign the values to another mXn matrix. 我也想稍后读取文件,并将值分配给另一个mXn矩阵。 How? 怎么样?

EDIT: I want it to be as easy as possible to later load the content of the file to a variable in matlab (a matrix). 编辑:我希望它尽可能容易地稍后将文件的内容加载到matlab(矩阵)中的变量。 I also might use the file in a C program where I load the numbers in the file to an mXn array. 我也可能在C程序中使用该文件,然后将文件中的数字加载到mXn数组中。

请参阅功能保存加载

DLMREAD / DLMWRITE对您有用吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM