Could anyone help me to solve the error in the following code
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2018-9-5
>> syms n k
>> symsum(nchoosek(n,k),k,0,n)
ans =
2^n
>> subs(ans, n, 4)
更多回答(1 个)
GK
2018-9-5
3 个评论
GK
2018-9-5
Could you share your code or example of it. Also I want to know, if its series is finite or infinity?
Walter Roberson
2018-9-5
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!