How can I use the ( nchoosek ) for the following case :- nchoosek(80,64) ???

조회 수: 8 (최근 30일)
I get the following warning message:
Warning: Result may not be exact. Coefficient is greater than 9.007199e+15 and is
only accurate to 15 digits.

채택된 답변

Walter Roberson
Walter Roberson 2022년 7월 19일
nchoosek(sym(80),64)
nchoosek(uint64(80),64)
result is 26958221130508525 which is 17 digits
I didn't expect uint64 to work but it does for this case
  댓글 수: 5
hayder fadhil
hayder fadhil 2022년 7월 20일
sorry sir
I have the following
x=[1:1:26]
y=16;
C = nchoosek(x,y)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
and I need to find the same process for
x=[1:1:80]
y=64;
How can i find C
Walter Roberson
Walter Roberson 2022년 7월 20일
x = 64:80;
y = 64;
C = arrayfun(@(X) nchoosek(uint64(X), y), x.')
C = 17×1
1 65 2145 47905 814385 11238513 131115985 1329890705 11969016345 97082021465

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Measurements and Feature Extraction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by