You are on page 1of 1

time = 0:0.

01:1;
Amp1 = 0.2;
Amp2 = 0.8;
Amp3 = 0.6;
frequency1 = 10;
frequency2 = 14;
frequency3 = 18;
wave1 = Amp1*sin(2*pi*frequency1*time);
wave2 = Amp2*sin(2*pi*frequency2*time);
wave3 = Amp3*sin(2*pi*frequency3*time);
wave = wave1 + wave2 + wave3;
wave = wave + 0.3*rand(1,size(wave,2));
wave = (wave./max(wave));
y = [zeros(1,10),3,zeros(1,10),-3,zeros(1,10),2,zeros(1,10),-2,zeros(1,57)];
wave=wave+y;
hw = plot(time,wave);