converting .m file to .mat
Afficher commentaires plus anciens
Hi
Does anyone knows how to convert .m file to .mat file. Please find my attached file below!
Thanks for your time!
7 commentaires
KSSV
le 6 Mar 2017
The code you gave generates a .mat file. What you are expecting?
davit petraasya
le 6 Mar 2017
davit petraasya
le 6 Mar 2017
KSSV
le 6 Mar 2017
The last line of the code:
save('GDF_Lacq_bottomhole_pressure.mat')
clearly says, to save the data in .mat file. You will get the .mat file.
davit petraasya
le 6 Mar 2017
Santhosh
le 5 Juil 2017
Thanks for the answer... It works good
Prabhakaran thirugnanam
le 19 Fév 2021
save('GDF_Lacq_bottomhole_pressure.mat') might save the mat file along with other variables which are available at the place where the line is placed. So it's better to create a simple function as below.
NOTE: M_File_Path and Mat_File_Path should be the whole path.(i.e. 'C:/users/......./xxx.m')
function Create_Mat_Out_Of_M_File(M_File_Path,Mat_File_Path)
run(M_File_Path);
clear M_File_Path;
save(Mat_File_Path);
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Text Data Preparation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!