diff --git a/PlottingTool.mlapp b/PlottingTool.mlapp index 01aabf4..f48292c 100644 Binary files a/PlottingTool.mlapp and b/PlottingTool.mlapp differ diff --git a/README.md b/README.md index e2d5a0d..f90bcf9 100644 --- a/README.md +++ b/README.md @@ -115,9 +115,8 @@ One last disclaimer: If there is a mistake in the data set, if you use a comma i There are numerous functionalities still missing. The following list provides an overview of all important functions, that should be added as soon as possible (more or less). The order of precedence represents the priority. 1. Merge plots (more than one data set in a single plot) – Maybe another tool for that? -2. Choose the order of the move mean filter -3. Add a custom x-axis label -4. Add the option for a derivation plot -5. Add try and catch statements around every user input +4. Add a custom x-axis label +5. Add the option for a derivation plot +6. Add try and catch statements around every user input You are very welcome to help develop this tool further. If you are planning to do so, please send me a message (Max Heckmann) and I give you a short introduction in the already existing code. This probably saves you some time. \ No newline at end of file diff --git a/meanPlotFnc.m b/meanPlotFnc.m index eaf28c9..6732c2b 100644 --- a/meanPlotFnc.m +++ b/meanPlotFnc.m @@ -1,4 +1,4 @@ -function meanPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, channels, path) +function meanPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, channels, path, order) %Iterate through all channels for channel = 1:width(data) @@ -39,15 +39,14 @@ function meanPlotFnc(data, fileSettings, checkboxes, start, stop, yAxis, channel end end - %Plot the channel figure(channel) plot(timeArray, yData, '-b'); hold all - plot(timeArray, movmean(yData, 20), '-r'); + plot(timeArray, movmean(yData, str2double(order)), '-r'); ylabel(yAxis{channel}.Value); xlabel('Time [s]'); - legend('Without movmean','With movmean (20th order)') + legend('Without movmean', strcat('With movmean (', order, 'th order)')) title(channels{channel}); %Save plot