Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
is defined as:
=
,
On the other hand, the real exponential sequence
is:
=
, ;
BASIC SIGNALS
5. Complex Exponential:
The complex exponential function
+
0
is defined as:
=
+
0
On the other hand, the complex exponential sequence
+
0
is:
=
+
0
,
BASIC SIGNALS
6. Sinusoidal:
The sinusoidal function sin
0
+ is defined as:
= cos
0
+
On the other hand, the sinusoidal sequence sin
0
+ is:
= cos
0
+ ,
OPERATIONS ON SEQUENCES
A. Signal adition:
This is a sample-by-sample addition given by:
1
+
2
=
1
+
2
B. Signal multiplication:
This is a sample-by-sample (or dot) multiplication) given by.
1
2
=
1
2
OPERATIONS ON SEQUENCES
C. Scaling:
In this operation each sample is multiplied by a scalar .
=
D. Shifting:
In this operation, each sample of is shifted by an amount to obtain a shifted sequence .
=
+ = , =
OPERATIONS ON SEQUENCES
E. Folding:
In this operation each sample of is flipped around = 0 to obtain a folded sequence .
=
F. Sample summation:
It adds all sample values of between
1
and
2
. This differs from signal addition operation.
=
1
++
2
2
=
1
OPERATIONS ON SEQUENCES
G. Sample products:
It multiplies all sample values of between
1
and
2
. This differs from signal multiplication.
=
1
2
1
H. Signal Energy:
The energy of a sequence is given by:
OPERATIONS ON SEQUENCES
I . Signal Power:
The average power of a periodic sequence with fundamental period is given by:
=
1
2
1
0
Time-based Applications
Ing. Guillermo Evangelista Adrianzn
gevangelistaa@upao.edu.pe
PICTURE RESIZER
>> xilinx=imread('C:\Users\Guillermo\Desktop\Xilinx Spartan.jpg');
>> imshow(xilinx);
function [picout] = picresize(picin,rows,cols)
l=size(picin)
Fr=l(1)/rows;
Fc=l(2)/cols;
for k=1:l(3)
for j=1:cols
for i=1:rows
picout(i,j,k)=picin(fix(i*Fr),fix(j*Fc),k);
end
end
end
subplot(2,1,1), imshow(picin); title('Original Picture')
subplot(2,1,2), imshow(picout); title('Resized Picture')
end
picout = picresize(xilinx,600,1000);
1
2
3
VOICE SAMPLING
1
T=1.5; %Time in seconds
recObj = audiorecorder(8000,8,1); %Sampling rate, #Bits, Mode(mono)
disp('Start to talk!')
recordblocking(recObj,T); %Record T seconds
disp('End of recording.');
play(recObj); %Play after recording
myData = getaudiodata(recObj); %Storing data
plot(myData,'r'), grid; %Plot the waveform
VOICE SAMPLING
2
function [sData] = shortData(Data,samples)
l=length(Data);
F=l/samples;
for i=1:samples
sData(i)=Data(fix(i*F));
end
%sData=sData'
subplot(2,1,1), plot(Data,'r'); grid,
title('Original Signal')
subplot(2,1,2), plot(sData); grid,
title('Processed Signal')
end
function [pData] = playData(data,Fs)
tic
pData = audioplayer(data,Fs,8);
%play(pData);
playblocking(pData);
toc
end
3
pData=playData(sData,4000)
4
5
sData=shortData(myData,6000);
VOICE SAMPLING