Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一位朋友通过电子邮件向我发送了一个文件 (.mat),其中包含一个相当大的矩阵 (200x200)。我需要获取此矩阵并将其插入到我的代码中,该代码是一个单独的文件 (.m) 我该怎么做?谢谢
您可以将 .mat 文件放在与 m 文件相同的目录中,并使用 load 命令将矩阵加载到变量中。
例如
Matrix = load('Example.mat');
这会将 .mat 文件中的矩阵存储在变量 Matrix 中。