# Matlab

#### Yeti

Joined Jul 26, 2005
35
Hey all, i need some help in MatLab:
I need to delay a voice signal a few tiems and play it back so to sounda s if im in a gym. i have this so far:

t=[1:length(y)]/fs;t=t );
wavplay(y);
T=.147;
x=zeros(size(y));
for n=1:4
x=y+(0.5^n)*y(t-n*T);
end
wavplay(x);

If i stand in the middle af the gym and only take the wall infront and behind me, i calculated that it would ne about .147 seconds to go to the first wall and back to me. and another .147 sec to go past me and bounce off the wall and back. Also the signal loses 50% of its amplitude from wall absorbtion.
Thanks for any input and help
Yeti

I got it figured out. Maybe not the best way to do it but it works.
clear all;close all; clc;
t=[1:length(y)]/fs;t=t );
x=0*y;
wavplay(y);
T=.147; %DELAY TIME
for n=0:4 %LOOP TO PLAY 3ECHOES AT LOWER AMPLITUDES AFTER EACH DELAY
sound(x*.5^n,fs);pause(T);
end

#### Brandon

Joined Dec 14, 2004
306
Originally posted by Yeti@Sep 19 2005, 12:26 AM
Hey all, i need some help in MatLab:
I need to delay a voice signal a few tiems and play it back so to sounda s if im in a gym. i have this so far:

t=[1:length(y)]/fs;t=t );
wavplay(y);
T=.147;
x=zeros(size(y));
for n=1:4
x=y+(0.5^n)*y(t-n*T);
end
wavplay(x);

If i stand in the middle af the gym and only take the wall infront and behind me, i calculated that it would ne about .147 seconds to go to the first wall and back to me. and another .147 sec to go past me and bounce off the wall and back. Also the signal loses 50% of its amplitude from wall absorbtion.
Thanks for any input and help
Yeti

I got it figured out. Maybe not the best way to do it but it works.
clear all;close all; clc;
t=[1:length(y)]/fs;t=t );