How to solve an integral with a limit?
22 views (last 30 days)
Show older comments
I am trying to solve the equation shown in the picture.
It contains a limit and an integral. Because of this I tried creating two equations as shown in the following code (At the beginning of the code there is some plotting code. You may ignore it):
if true
Fs = 33280;
N = 256;
t = 0:1/Fs:(N/Fs)-(1/Fs);
x = 4*sin(1040*pi*t) + cos(3120*pi*t);
Pix = (4*sin(1040*pi*t) + cos(3120*pi*t)).^(2);
plot(t,x,'b')
title('Señales x(t) y Pix(t)')
xlabel('t')
grid on
hold on
plot(t,Pix,'g')
Pix = @(t) (4*sin(1040*pi*t) + cos(3120*pi*t)).^(2);
integ = @(t) integral(Pix(t),t,-inf,inf);
Px= @(t) ((1./(2.*t)).*(integ(t)));
l= limit(Px(t),t,Inf);
end
As seen above, I try to first solve the integral of Pix, from minus infinite to infinite. Then, I define Px as the equation shown in the integral. Then, I try to solve the limit. I get these errors though:
Error using integral (line 82) First input argument must be a function handle.
Error in Tarea_3>@(t)integral(Pix(t),t,-inf,inf)
Error in Tarea_3>@(t)((1./(2.*t)).*(integ(t)))
Error in Tarea_3 (line 23) l= limit(Px(t),t,Inf);
Thanks fot the help.
0 Comments
Answers (1)
Torsten
on 22 Jan 2018
syms t L
x_squared = (4*sin(1040*pi*t) + cos(3120*pi*t))^2;
P = limit(1/(2*L)*int(x_squared,t,-L,L),L,Inf);
Best wishes
Torsten.
0 Comments
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!