What is the difference between .m and .mat files in MATLAB

梦想的初衷 提交于 2019-12-20 08:27:57

问题


When I traced my reference MATLAB script, I found files with the .mat extension. My questions are:

  1. What is the difference between .mat and .m files?
  2. How does one open files with the .mat extension?

回答1:


Files with a .m extension contain MATLAB code, either in the form of a script or a function.

Files with a .mat extension contain MATLAB formatted data, and data can be loaded from or written to these files using the functions load and save, respectively. You can also access and change variables directly in MAT-files without loading them into memory using the function matfile.



来源:https://stackoverflow.com/questions/3947549/what-is-the-difference-between-m-and-mat-files-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!