필터 지우기
필터 지우기

How to get every term of a sum thats not multiplied by a convergent exponential function?

조회 수: 1 (최근 30일)
Hey, I need every term of a sum thats not multiplied by a convergent exponential function. In my case:
syms t
G = exp(-t)*cos(t) + 3*exp(-2*t)*sin(2*t) + 1/2*cos(4*t) + 1/5
G = 
What I need is stored in a variable. Is there any MATLAB function that fits my purpose?

채택된 답변

Walter Roberson
Walter Roberson 2023년 12월 5일
Not exactly what you asked, but
syms t
G = exp(-t)*cos(t) + 3*exp(-2*t)*sin(2*t) + 1/2*cos(4*t) + 1/5
G = 
mapSymType(G, 'exp', @(varargin) 0)
ans = 
The reason it is not exactly what you asked is that you specified "not multipled by a convergent exponential function", implying that you would want a term with exp(5*t) [for example] to be retained as that is not convergent. So the parameter to the exp() needs to be examined to determine whether the exp() would be convergent or not.
  댓글 수: 1
Walter Roberson
Walter Roberson 2023년 12월 6일
syms t
G = exp(-t)*cos(t) + 3*exp(-2*t)*sin(2*t) + 1/2*cos(4*t) + 1/5 + 5*exp(7*t)
G = 
H = mapSymType(G, 'exp', @(EXPR) piecewise(LimitIsInf(children(EXPR,1)), EXPR, sym(0)))
H = 
function tf = LimitIsInf(EXPR)
var = symvar(EXPR,1);
if ~isempty(var)
tf = isAlways(limit(EXPR,var,inf)==inf, 'unknown', "true");
else
tf = isAlways(~isfinite(EXPR), 'unknown', "true");
end
tf = tf == symtrue;
end

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by