Effacer les filtres
Effacer les filtres

Difference between .m and .mat files

141 vues (au cours des 30 derniers jours)
Ali
Ali le 25 Jan 2012
Commenté : Andreas Goser le 16 Août 2016
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!

Réponse acceptée

Andreas Goser
Andreas Goser le 25 Jan 2012
Modifié(e) : Stephen23 le 15 Déc 2015
  • 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')

Plus de réponses (1)

saptesh pandit
saptesh pandit le 13 Août 2016
how do I provide communication between script and simulink model. And is it possible to run model and script simultaneously.
  1 commentaire
Andreas Goser
Andreas Goser le 16 Août 2016
Which is a totally different question and I suggest to ask as a new one.

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by