Command for saving .M files ?

57 visualizaciones (últimos 30 días)
GIULIO RODONO'
GIULIO RODONO' el 15 de Oct. de 2013
Comentada: JAYYOUNG el 23 de Jun. de 2023
Hi there! Are you all ok ?
I got a problem: I would save a .M file by another .M file; this would be usefull for me, because I often modify several files, all used by a single file after. So, could anyone tell me, if it exists, wich is the command to save a .M file, by another .M file ??
% file1.m
% HAS BEEN JUST EDITED, BUT NOT YET SAVED
%
% file2.m
% save(file1.m) <--- PSEUDO CODE FOR SAVING file1.m
Thank you in advance, for kindle answers !!

Respuestas (1)

Jan
Jan el 11 de Jul. de 2021
Name = 'file1.m'
Doc = matlab.desktop.editor.findOpenDocument(Name);
if Doc.Editable
Doc.save;
end
  1 comentario
JAYYOUNG
JAYYOUNG el 23 de Jun. de 2023
Thanks so much now I got how to 'index' my script text, and how to manage it (saveAs...blabla)
You saved my time really :) managing 200+ m files lol

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by