%Waveform Filtering %just the computations -- no GUI clear all figure(1) clf figure(2) clf %choose a waveform 'mepp|pulse|chirp" %choose noise 'on|off' and the amplitude %choose a filter type 'butter|cheby|Parks' wavetype='chirp' noise='off' filtertype='parks' %1000 samples in 1/10 second = %sample rate of 10000 /sec time = linspace(0,.1,1000); %make the chosen waveform switch wavetype case 'mepp' %simulate a noiseless mepp gain = 550; %sets the mepp amplitude tconst = .005; %sets the decay time begintime = .02 waveform = gain * (time-begintime) ... .* exp(-(time-begintime)/tconst) ... .* (time > begintime); case 'pulse' %simulate a noiseless mepp gain = 1; %sets the pulse amplitude begintime = .02 ; endtime = .07 ; waveform = gain * (time>begintime & time