Could anyone help me to solve the error in the following code
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
jaah navi
el 5 de Sept. de 2018
Comentada: jaah navi
el 5 de Sept. de 2018
code:
syms n k
n=4
k=0
symsum(nchoosek(n,k),k,0,n)
If i run the code it gives error stating Undefined function 'symsum' for input arguments of type 'double'.
Could anyone help me how to overcome it.
0 comentarios
Respuesta aceptada
Walter Roberson
el 5 de Sept. de 2018
>> syms n k
>> symsum(nchoosek(n,k),k,0,n)
ans =
2^n
>> subs(ans, n, 4)
3 comentarios
Walter Roberson
el 5 de Sept. de 2018
syms n k
f = symsum(nchoosek(n,k),k,0,n);
subs(f, n, [4 5 6 7])
Más respuestas (1)
GK
el 5 de Sept. de 2018
3 comentarios
GK
el 5 de Sept. de 2018
Could you share your code or example of it. Also I want to know, if its series is finite or infinity?
Walter Roberson
el 5 de Sept. de 2018
You would not have been able to use
syms n k
without the Symbolic Math toolbox -- not unless you happened to have Maple installed instead.
Ver también
Categorías
Más información sobre Calculus en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!