save a log file in a specific directory

6 visualizaciones (últimos 30 días)
Céline Bachelier
Céline Bachelier el 13 de Feb. de 2014
Editada: Image Analyst el 13 de Feb. de 2014
Hi,
Is it possible to save a log file in a specific directory, if yes, can you explain me how please?
For now , this is a piece of my script:
racine_name = (file_name(1:strfind(file_name,'_NIV0')-1));
%%Ouverture d'un fichier Log
file_name_log=[racine_name,'.log'];
fid_log=fopen(file_name_log,'a');
Thanks in advance
Regards Céline Bachelier

Respuestas (2)

Céline Bachelier
Céline Bachelier el 13 de Feb. de 2014
I finally found

Image Analyst
Image Analyst el 13 de Feb. de 2014
Editada: Image Analyst el 13 de Feb. de 2014
Adapt this:
% Get the name of the file that the user wants to save.
% Note, if you're saving an image you can use imsave() instead of uiputfile().
startingFolder = userpath
defaultFileName = fullfile(startingFolder, '*.log);
[baseFileName, folder] = uiputfile(defaultFileName, 'Specify a file');
if baseFileName == 0
% User clicked the Cancel button.
return;
end
fullFileName = fullfile(folder, baseFileName)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by