# symbolic integer, Why doesn't it work?

1 visualizzazione (ultimi 30 giorni)
Katalin Kuchinka il 1 Feb 2021
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
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposte (1)

Shubham Rawat il 4 Feb 2021
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 CommentoMostra -1 commenti meno recentiNascondi -1 commenti meno recenti
Katalin Kuchinka il 8 Feb 2021
Thanks. But, I want to create a function f(t,n).
I need to find

Accedi per commentare.

### Categorie

Scopri di più su Assumptions in Help Center e File Exchange

R2020b

### Community Treasure Hunt

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

Start Hunting!

Translated by