mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sw-plotting-tool.git
synced 2025-06-10 01:55:59 +00:00
24 lines
660 B
Matlab
24 lines
660 B
Matlab
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
|
|
|