Difference between .m and .mat files

223 ビュー (過去 30 日間)
Ali
Ali 2012 年 1 月 25 日
コメント済み: Andreas Goser 2016 年 8 月 16 日
What's the difference betwwen .m and .mat files? can a file from .m format be converted automatically to .mat?
Many thanks in advance for your answer!

採用された回答

Andreas Goser
Andreas Goser 2012 年 1 月 25 日
編集済み: Stephen23 2015 年 12 月 15 日
  • MATLAB code is in files with extension .M.
  • MATLAB data is in files with extension .MAT.
Thus, you can't always "convert". But if your MATLAB code just contains variable assignments, yes then you can "convert"
Assuming you have a file testm.m with the assigments
a=1
b=2
then you would convert by running the file and then save a MAT file
testm
save('testmat.mat')

その他の回答 (1 件)

saptesh pandit
saptesh pandit 2016 年 8 月 13 日
how do I provide communication between script and simulink model. And is it possible to run model and script simultaneously.
  1 件のコメント
Andreas Goser
Andreas Goser 2016 年 8 月 16 日
Which is a totally different question and I suggest to ask as a new one.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by