Escolar Documentos
Profissional Documentos
Cultura Documentos
AIM: To write a program in MATLAB to perform the finding Finding Power and (or) Energy of a given signal.
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 = 201
Average_power = 0.5012
RESULT:- The power and energy of the given signal is calculated by using a matlab program