mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sw-plotting-tool.git
synced 2025-12-16 18:18:03 +00:00
Initialization
This commit is contained in:
23
saveFigs.m
Normal file
23
saveFigs.m
Normal file
@@ -0,0 +1,23 @@
|
||||
function saveFigs(folder, figureVar, channelName, path, file)
|
||||
|
||||
%Suppress the warnings. If not where would be a lot of warnings
|
||||
%because of the creation of folders that already exist
|
||||
warning('off','all');
|
||||
|
||||
%Create file folder
|
||||
file = strcat(path, '\', file);
|
||||
mkdir(file);
|
||||
|
||||
%Create type folder (graph, mean, fourier)
|
||||
folder = strcat(file, '\', folder);
|
||||
mkdir(folder);
|
||||
|
||||
%Create path for saving and save as .fig and .png
|
||||
pathName = strcat(folder, '\', channelName);
|
||||
savefig(figureVar, strcat(pathName, '.fig'));
|
||||
saveas(figureVar, strcat(pathName, '.png'));
|
||||
|
||||
%Turn warning back on
|
||||
warning('on','all')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user