MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB中.m和.mat文件有什么区别 (https://www.labfans.com/bbs/showthread.php?t=24005)

poster 2019-12-10 20:48

MATLAB中.m和.mat文件有什么区别
 
跟踪参考MATLAB脚本时,发现了扩展名为.mat文件。我的问题是:
[LIST=1][*] .mat和.m文件有什么区别?[*]如何打开一个扩展名为.mat文件?[/LIST]
[B]回答:[/B]

扩展名为.m的文件包含[URL="https://www.mathworks.com/help/matlab/learn_matlab/scripts.html"]脚本[/URL]或[URL="https://www.mathworks.com/help/matlab/matlab_prog/create-functions-in-files.html"]函数[/URL]形式的MATLAB代码。

扩展名为.mat的文件包含[URL="http://www.mathworks.com/help/matlab/import_export/supported-file-formats.html"]MATLAB格式的数据[/URL] ,可以分别使用[URL="https://www.mathworks.com/help/matlab/ref/load.html"]load[/URL]和[URL="https://www.mathworks.com/help/matlab/ref/save.html"]save[/URL]函数从这些文件加载数据或将数据写入这些文件。您还可以直接在MAT文件中访问和更改变量,而无需使用[URL="https://www.mathworks.com/help/matlab/ref/matfile.html"]matfile[/URL]函数将其加载到内存中。



[url=https://stackoverflow.com/questions/3947549]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:23

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.