diff --git a/PlottingTool.mlapp b/PlottingTool.mlapp index 4f9eecc..ee1ea30 100644 Binary files a/PlottingTool.mlapp and b/PlottingTool.mlapp differ diff --git a/diffPlotFnc.m b/diffPlotFnc.m index c0ac404..7661601 100644 --- a/diffPlotFnc.m +++ b/diffPlotFnc.m @@ -1,4 +1,4 @@ -function diffPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, xAxis, channels, path, order) +function diffPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, xAxis, channels, path) %Iterate through all channels for channel = 1:width(data) @@ -43,6 +43,10 @@ function diffPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, xAxis, figure(channel) plot(timeArray, yData, '-b'); hold all + + %shorten time array to match lost value from diff + timeArray(end) = []; + plot(timeArray, diff(yData), '-r'); ylabel(yAxis{channel}.Value); xlabel(xAxis{channel}.Value); @@ -50,7 +54,7 @@ function diffPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, xAxis, title(channels{channel}); %Save plot - saveFigs('median', figure(channel), channels(channel), path, fileSettings{1}.Value) + saveFigs('derivative', figure(channel), channels(channel), path, fileSettings{1}.Value) %reset hold off diff --git a/fourierPlotFnc.m b/fourierPlotFnc.m index d66bc70..795b630 100644 --- a/fourierPlotFnc.m +++ b/fourierPlotFnc.m @@ -47,7 +47,7 @@ function fourierPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, xAxi Nspec = 1024; end wspec = hamming(Nspec); - Noverlap = Nspec/2; + Noverlap = int16(Nspec/2); hold on figure(channel)