Commit 9ae36692 authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet
Browse files

get sampling rate depending on type of available data

parent abf12e1b
......@@ -49,7 +49,12 @@ channelUnits = cell(1,nDataSet);
nodes = zeros(nDataSet,1);
switch ds.abscissaUnitsLabel
case 's' % data from B&K Pulse or other measurement systems
SamplingRate = round(1./DataSet{1}.dx);
if ~isempty(ds.dx)
SamplingRate = 1./ds.dx;
SamplingRate = median(1./diff(unique(abscissa)));
SamplingRate = round(SamplingRate,-1);
for i=1:nDataSet %Read the data into the variables
y = DataSet{i}.measData(:);
if ~isempty(y)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment