- MATLAB code is in files with extension .M.
- MATLAB data is in files with extension .MAT.
Difference between .m and .mat files
168 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
Andreas Goser
2012-1-25
编辑:Stephen23
2015-12-15
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')
0 个评论
更多回答(1 个)
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!