Commit 6e026453 authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter

fixed typo. changed repitition to repetition

parent 8e85c102
...@@ -26,7 +26,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -26,7 +26,7 @@ classdef itaMSTFinterleaved < itaMSTF
nWait % samples between two subsequent sweeps nWait % samples between two subsequent sweeps
end end
properties(Dependent = false, Hidden = false, SetObservable = true, AbortSet = true) properties(Dependent = false, Hidden = false, SetObservable = true, AbortSet = true)
repititions = 1; % how many times do you want the signal to be played? repetitions = 1; % how many times do you want the signal to be played?
end end
methods methods
...@@ -92,7 +92,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -92,7 +92,7 @@ classdef itaMSTFinterleaved < itaMSTF
% properties. % properties.
addlistener(this,'twait','PreSet',@this.init); addlistener(this,'twait','PreSet',@this.init);
addlistener(this,'outputChannels','PreSet',@this.init); addlistener(this,'outputChannels','PreSet',@this.init);
addlistener(this,'repititions','PreSet',@this.init); addlistener(this,'repetitions','PreSet',@this.init);
end end
%% INIT %% INIT
...@@ -414,11 +414,11 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -414,11 +414,11 @@ classdef itaMSTFinterleaved < itaMSTF
nSamples = result.nSamples; nSamples = result.nSamples;
% extend result % extend result
result.fftDegree = nSamples + nWaitSum * (this.repititions - 1); result.fftDegree = nSamples + nWaitSum * (this.repetitions - 1);
timeData = single(result.time).'; timeData = single(result.time).';
idxx_init = (1:nSamples); idxx_init = (1:nSamples);
ita_verbose_info('itaMSTFinterleaved::appending time data.',1); ita_verbose_info('itaMSTFinterleaved::appending time data.',1);
for idx = 2:this.repititions for idx = 2:this.repetitions
idxx = idxx_init+nWaitSum * (idx-1); idxx = idxx_init+nWaitSum * (idx-1);
timeData(:,idxx) = timeData(:,idxx) + singleTimeData; timeData(:,idxx) = timeData(:,idxx) + singleTimeData;
end end
...@@ -528,8 +528,8 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -528,8 +528,8 @@ classdef itaMSTFinterleaved < itaMSTF
sArgs = struct('tIR', 0.005, 'tSpace', 0.002); sArgs = struct('tIR', 0.005, 'tSpace', 0.002);
sArgs = ita_parse_arguments(sArgs, varargin); sArgs = ita_parse_arguments(sArgs, varargin);
reps = this.repititions; reps = this.repetitions;
this.repititions = 1; this.repetitions = 1;
% Measure Signal, Distortion and Noise: % Measure Signal, Distortion and Noise:
SDN = this.run; SDN = this.run;
% Measure Distortion and Noise: (Turn off one loudspeaker each measurement) % Measure Distortion and Noise: (Turn off one loudspeaker each measurement)
...@@ -539,7 +539,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -539,7 +539,7 @@ classdef itaMSTFinterleaved < itaMSTF
DN(idx) = temp.ch(idx); %#ok<AGROW> DN(idx) = temp.ch(idx); %#ok<AGROW>
end end
this.pre_scaling = ones(1,numel(this.outputChannels)); this.pre_scaling = ones(1,numel(this.outputChannels));
this.repititions = reps; this.repetitions = reps;
DN = merge(DN); DN = merge(DN);
% Apply window: % Apply window:
...@@ -630,7 +630,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -630,7 +630,7 @@ classdef itaMSTFinterleaved < itaMSTF
% jri: changed default output behaviour to multi instance % jri: changed default output behaviour to multi instance
% this is done to have a consistent behaviour with % this is done to have a consistent behaviour with
% each use case of the class % each use case of the class
timeData = reshape(data.timeData(1:nSamplesWait*this.repititions*nOutputChannels, :) , nSamplesWait, data.nChannels*this.repititions*nOutputChannels); timeData = reshape(data.timeData(1:nSamplesWait*this.repetitions*nOutputChannels, :) , nSamplesWait, data.nChannels*this.repetitions*nOutputChannels);
if (nOutputChannels > 1) if (nOutputChannels > 1)
resultsMI = itaAudio(1,nOutputChannels); resultsMI = itaAudio(1,nOutputChannels);
for index = 1:nOutputChannels for index = 1:nOutputChannels
...@@ -646,8 +646,8 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -646,8 +646,8 @@ classdef itaMSTFinterleaved < itaMSTF
% no speed up possible... do it the slow way: % no speed up possible... do it the slow way:
%-------------------------------------------------------------- %--------------------------------------------------------------
nSamplesWait = repmat(nSamplesWait,this.repititions,1); nSamplesWait = repmat(nSamplesWait,this.repetitions,1);
final_idx = numel(this.outputChannels) * this.repititions; % Compute total number of sweeps that has been played back. final_idx = numel(this.outputChannels) * this.repetitions; % Compute total number of sweeps that has been played back.
% Prepare data for cropping. Extract as many samples from % Prepare data for cropping. Extract as many samples from
% recording data as originally were in the excitation. % recording data as originally were in the excitation.
...@@ -674,7 +674,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -674,7 +674,7 @@ classdef itaMSTFinterleaved < itaMSTF
currentData = data.'; currentData = data.';
end end
for idx = ch_idx:nOutputChannels:(this.repititions * nOutputChannels) for idx = ch_idx:nOutputChannels:(this.repetitions * nOutputChannels)
% Crop data to an interval equal to the number of the wait samples. % Crop data to an interval equal to the number of the wait samples.
% Move this interval by the number of wait samples for every loop iteration. % Move this interval by the number of wait samples for every loop iteration.
...@@ -750,7 +750,7 @@ classdef itaMSTFinterleaved < itaMSTF ...@@ -750,7 +750,7 @@ classdef itaMSTFinterleaved < itaMSTF
% properties to be saved during the savin process. % properties to be saved during the savin process.
result = {'mTwait','mCommentData', 'repititions'}; result = {'mTwait','mCommentData', 'repetitions'};
end end
......
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