Could anyone help me to solve the error in the following code
조회 수: 7 (최근 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!