Use the symbolic toolbox of Matlab to calculate the energy of the signals x(t) and f(t). Verify theoretically. How is the energy of these two signals related?
Ältere Kommentare anzeigen
I have two piecewise defined functions, x(t) and a reversed and shifted version of x(t) as shown below...I am supposed to use the symbolic toolbox in Matlab to calculate the energy of these two signals and explain how they are related. Not sure what the symbolic toolbox is...is it using syms function? Code for both signals is below.
% code
x = @(t) zeros(size(t)) +(t >= 0 & t < 2).*((1/2)*exp(t)) + (t >= 2 & t < 4).*(2*t-8);
t = linspace(0,6);
plot(t,x(t))
axis([-1 8 -4 4])
xlabel('Time(t)')
ylabel('x(t)')
title('Function x(t)')
% code
x = @(t) zeros(size(t)) +(t >= 0 & t < 2).*((1/2)*exp(t)) + (t >= 2 & t < 4).*(2*t-8);
f = @(t) x(-t-1);
t = linspace(-7, -1);
plot(t,f(t))
axis([-8 1 -4 4])
xlabel('Time(t)')
ylabel('f(t)');
title('Left shift and time reversal of x(t)')
Akzeptierte Antwort
Weitere Antworten (1)
syms x(t)
assume(t,'real');
x(t) = exp(t)/2*rectangularPulse(0,2,t) + (2*t - 8)*rectangularPulse(2,4,t)
Energy in real-valued x(t):
Ex = int(x(t)^2,t,-inf,inf)
disp(char(Ex))
x1(t) = x(-t-1);
Ex1 = int(x1(t)^2,t,-inf,inf)
disp(char(Ex1))
Kategorien
Mehr zu Code Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!