mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sw-plotting-tool.git
synced 2025-12-18 02:48:02 +00:00
Initialization
This commit is contained in:
53
fourierPlotFnc.m
Normal file
53
fourierPlotFnc.m
Normal file
@@ -0,0 +1,53 @@
|
||||
function fourierPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, channels, path)
|
||||
|
||||
%Iterate through all channels
|
||||
for channel = 1:width(data)
|
||||
|
||||
%If Graph is checked
|
||||
if checkboxes{channel}.Value == 1
|
||||
|
||||
%Convert start and ending time
|
||||
beginning = str2double(start{channel}.Value);
|
||||
ending = str2double(stop{channel}.Value);
|
||||
|
||||
%if first row increment is not checked
|
||||
if fileSettings{2}.Value == 0
|
||||
[timeArray, yData] = timeAxisWithIncrement(data, fileSettings{3}.Value, beginning, ending, channel);
|
||||
else
|
||||
%TO DO
|
||||
end
|
||||
|
||||
%Don't really now what I am doing here.
|
||||
fs = 1 / fileSettings{3}.Value;
|
||||
Nfft = 2^nextpow2(length(yData));
|
||||
yData = fft(yData, Nfft);
|
||||
|
||||
Nspec = 256;
|
||||
wspec = hamming(Nspec);
|
||||
Noverlap = Nspec/2;
|
||||
|
||||
hold on
|
||||
figure(channel)
|
||||
spectrogram(yData, wspec, Noverlap, Nspec, fs, 'yaxis');
|
||||
title(channels{channel});
|
||||
|
||||
|
||||
%Plot the channel
|
||||
% hold on
|
||||
% figure(channel)
|
||||
% spectrogram(yData, 'yaxis');
|
||||
% title(channels{channel});
|
||||
|
||||
%Save plot
|
||||
saveFigs('fourier', figure(channel), channels(channel), path, fileSettings{1}.Value)
|
||||
|
||||
%reset
|
||||
hold off;
|
||||
close all;
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user