symbolic integer, Why doesn't it work?

I want to find the sum:
I tried finding with symbolic integer
syms n t
evalin(symengine,'assume(n,Type::Integer)');
symsum(exp(-k^2*t),k,1,n-1)
or
syms n t
evalin(symengine,'assume(n,Type::Integer)');
symsum(exp(-k*k*t),k,1,n-1)
I have got the next answer

답변 (1개)

Shubham Rawat
Shubham Rawat 2021년 2월 4일

0 개 추천

Hi Katalin,
You may try this:
syms k t
evalin(symengine,'assume(n,Type::Integer)');
n = 3; %taking input from workspace
symsum(exp(-k*k*t),k,1,n-1)
Result :
ans =
exp(-t) + exp(-4*t)
Hope this Helps!

댓글 수: 1

Katalin Kuchinka
Katalin Kuchinka 2021년 2월 8일
Thanks. But, I want to create a function f(t,n).
I need to find

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

카테고리

도움말 센터File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 2월 1일

댓글:

2021년 2월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by