Você está na página 1de 1

2. Finding Power and (or) Energy of a given signal.

AIM: To write a program in MATLAB to perform the finding Finding Power and (or) Energy of a given signal.

APPARATUS REQUIRED : MATLAB SOFTWARE.

PROGRAMS:

clear all;
close all;
clc;
t = 0:0.01:4;
tes = cos (2*pi*t);
M = length (tes);
sum = 0;
for i = 1: M,
sum = sum + tes(i)*tes(i);
end;
disp ('Energy of the given sequence is ...: ');
Energy = sum
disp ('Average Power of the given sequence is ...: ');
Average_power = sum/M

OUTPUT

Energy of the given sequence is ..... ::

Energy = 201

Average Power of the given sequence is ..... ::

Average_power = 0.5012

RESULT:- The power and energy of the given signal is calculated by using a matlab program

Você também pode gostar