Why Does int() of rectangularPulse Return NaN?

조회 수: 1 (최근 30일)
Paul
Paul 2021년 7월 9일
댓글: Paul 2022년 5월 25일
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?
  댓글 수: 1
Paul
Paul 2022년 5월 25일
Fixed in 2022a
syms t real
x(t) = rectangularPulse(0,1,t);
int(x(t),t,0,inf)
ans = 
1
int(x(t),t,-inf,inf)
ans = 
1
int(rectangularPulse(0,1,t),-2,inf)
ans = 
1

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2021년 7월 9일
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
Paul
Paul 2021년 7월 10일
편집: Paul 2021년 7월 10일
Just seems so strange because int() handles much more complex functions, which is just about any function, with ease. I'll see what Tech Support says about this.
Another interesting result:
syms t real
int(rectangularPulse(0,1,t),-inf,2)
ans = 
1
int(rectangularPulse(0,1,t),-2,inf)
ans = 
NaN
Walter Roberson
Walter Roberson 2021년 7월 10일
I have a suspicion that somewhere along the way, a dirac(0) is getting invoked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by