Answer to Question #261645 in Electrical Engineering for Mafizur Alam

Question #261645

X(t) = t-2 for -2<=t<=0


= 2-t for 0<=t<=+2


= 0 otherwise


Find out the Energy and power of the signal. Also check whether the signal is energy signals and power signals

1
Expert's answer
2021-11-10T00:49:12-0500
close all,
clear all,
clc,


Fs=100;
t = -2:(1/Fs):2;
Xt = [];


Energy = 0;
Power = 0;
for r=1:length(t)
    Xt(r)=0;
    if(t(r)>=-2 && t(r)<=0), Xt(r) = t(r)-2;   end
    if(t(r)>0   && t(r)<=2), Xt(r) = 2 - t(r); end
    Energy = Energy + Xt(r)*Xt(r);
end
scrsz = get(0,'ScreenSize');
Dim=0;
figure('Position',[scrsz(1)+Dim, scrsz(2)+Dim,scrsz(3)-20,scrsz(4)-100]);
plot(t,Xt);
xlabel('--- Time (t) ---');
ylabel('--- X(t) --->');
title('X(t) for -2 < t < 2','FontSize',20);
grid on,
Power = Energy/length(Xt);
fprintf('\n\tEnergy = %.3f',Energy);
fprintf('\n\tPower  = %.3f',Power);



Energy = 2141.340

Power = 5.340









Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS