MATLAB Answers

Why Does int() of rectangularPulse Return NaN?

3 views (last 30 days)
Paul
Paul on 9 Jul 2021
Commented: Walter Roberson on 10 Jul 2021
syms t real
x(t) = rectangularPulse(0,1,t);
int(x(t),t,0,5)
ans = 
1
int(x(t),t,0,inf)
ans = 
NaN
int(x(t),t,-10,10)
ans = 
1
int(x(t),t,-inf,inf)
ans = 
NaN
Any ideas why those two cases return NaN?

Accepted Answer

Walter Roberson
Walter Roberson on 9 Jul 2021
Work-around:
syms b x t real
assume(b>=0)
y(t) = rectangularPulse(x,1,t)
y(t) = 
z = int(y,t,0,b)
z = 
limit(z, b, inf)
ans = 
  4 Comments
Walter Roberson
Walter Roberson on 10 Jul 2021
I have a suspicion that somewhere along the way, a dirac(0) is getting invoked.

Sign in to comment.

More Answers (0)

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!