# DTMF Encoder/Decoder with GUI using FFT,goertzel,Filter Banks

### Anastasios Zouzias (view profile)

A phone-like DTMF Encoding/Decoding tool

[num10signal]=call10number(phonenumber),
```function [num10signal]=call10number(phonenumber),
%   call10number : Computes the DTMF signal for 10 digits in the raw.
%   [num10signal]=call10number(phonenumber)
%   If k~={1,2,3,4,5,6,7,8,9,0,'*','#'} then ,
%
%
%       Input :
%       k  : to plhktro to opoio path8hke.
%
%
%       Output:
%       num10signal : To DTMF shma gia 10 digit in the raw.
%   end
%   Author : Zouzias Anastasios
%   Email : zouzias@ceid.upatras.gr
%   \$Date: 2005/08/31 18:03:00 \$

N=204;
n=0:N-1;
fs=8192;
F_c=[697;770;852;941]*ones(1,3);
F_c=F_c';F_c=F_c(:)';
F_r=[1209;1336;1477]*ones(1,4);
F_r=F_r(:)';
F=2*pi/fs*[F_c;F_r];

% My 10 numbers signal
num10signal=[];

for i=1:1:size(phonenumber,2),
signal=[];

switch phonenumber(1,i),

case {'1','2','3','4','5','6','7','8','9'}
signal=cos(F(:,str2num(phonenumber(1,i)))*n);

signal=sum(signal);

signal=[signal zeros(size(signal))];
case '*'
signal=cos(F(:,10)*n);

signal=sum(signal);

signal=[signal zeros(size(signal))];
case '#'
signal=cos(F(:,12)*n);

signal=sum(signal);

signal=[signal zeros(size(signal))];

case '0'
signal=cos(F(:,11)*n);

signal=sum(signal);

signal=[signal zeros(size(signal))];

otherwise disp('Unknown digit')
end
signal=signal';
num10signal=[num10signal' signal']';
sound(signal,fs);

end

```