%build 100 mepps and store them clear all %1000 samples in 1/10 second = %sample rate of 10000 /sec time = linspace(0,.1,1000)'; %mepp parameters gain = 550; %sets the mepp amplitude tconst = .005; %sets the decay time noisegain = .15; %sets the noise amplitude for i=1:100 %jitter the beginning times %except don't jitter trace 100 begintime = .01 + .02*rand*(i~=100); %generate a mepp model with noise %but elimanate noise from trace 100 mepp(:,i) = gain * (time-begintime) ... .* exp(-(time-begintime)/tconst) ... .* (time > begintime) ... + noisegain*(i~=100)*randn(size(time)); end save e:\mepps mepp