From 5eb6f96dddd85cf800d89562a91b3cba8d9f802d Mon Sep 17 00:00:00 2001 From: mariosmsk Date: Sat, 10 Aug 2019 19:06:13 +0300 Subject: [PATCH] add option for savename --- SPLACE.m | 10 ++++++---- Sensors_report.txt | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/SPLACE.m b/SPLACE.m index c27e2a5..38b06e2 100644 --- a/SPLACE.m +++ b/SPLACE.m @@ -1221,9 +1221,11 @@ function export_sensors_Callback(hObject, eventdata, handles) % handles structure with handles and user data (see GUIDATA) load([pwd,'\RESULTS\','w.report'],'w','-mat'); -% [~, repname] = fileparts(handles.B.InputFile); +[file,path] = uiputfile('*.txt'); + +[~, inpname] = fileparts(handles.B.InputFile); % name = [repname, 'Sensors_report.txt']; -name = 'Sensors_report.txt'; +name = [path, file]; f = fopen(name, 'w'); for i=1:length(w) @@ -1233,9 +1235,9 @@ function export_sensors_Callback(hObject, eventdata, handles) fprintf(f, '\n'); fprintf(f, '----------------------------------------------------'); -fprintf(f, '\n'); -fprintf(f, '\n'); +fprintf(f, '\n\n'); +fprintf(f, ['Network file: "' inpname, '.inp"\n\n']); fprintf(f, 'Report by S-PLACE Toolkit.'); fclose(f); diff --git a/Sensors_report.txt b/Sensors_report.txt index 8b17fc1..a84bc87 100644 --- a/Sensors_report.txt +++ b/Sensors_report.txt @@ -10,4 +10,6 @@ mean = 17926.36 max = 60480.00 NodesID: 11 22 31 ---------------------------------------------------- +Network file: "Net1_Rossman2000.inp" + Report by S-PLACE Toolkit. \ No newline at end of file