clear all % t=7*sin(48/180*pi)-cot(pi/17)+tan(72/180*pi) % clc % m=0:5:65 % f=(m*5280)/3600 % a={'mili/saatshi','futi/tsamshi'} % a={a [m f]'} % display(a) % The sum of the original signal and the tree % echoes is stored % in a data file and then plotted. t=0.0:0.1:10; % s=zeros(size(t)); s(1:8)=[0 0.5 1 -0.5 0.75 0 -0.2 -0.1]; %% % Generate three echoes by scaling and % delaiing original signal. % echo_1=zeros(size(t)); echo_1(7:14)=0.5*s(1:8); echo_2=zeros(size(t)); echo_2(14:21)=-0.3*s(1:8); echo_3=zeros(size(t)); echo_3(21:28)=0.1*s(1:8); % % Add echoes to original signal giving new signal. % Save time signal and new signal. % g=echo_1+echo_2+echo_3; % g(1:8)=g(1:8)+s; g=[zeros(1,4*length(s)),s,0.5*s,0.3*s,0.1*s,zeros(1,length(t)-8*length(s))] save echo3 t g; % % % plot new signal. % plot(t,g),... title('signal with echo'),... xlabel('t, seconds'),... ylabel('g[k]'),... grid