フィルターのクリア

funtion don't run

1 回表示 (過去 30 日間)
Duong Cong  Bien
Duong Cong Bien 2015 年 11 月 25 日
コメント済み: dpb 2015 年 11 月 25 日
F=[];
A=[];
m=5;
sum=0;
for n=100:100:2000
for f=1:1:n
for i=0:1:f
p=exp(-(n-m-1)/f);
sum=sum+(factorial(f)/(factorial(i)*factorial(f-i)))*p^i*(1-p)^(f-i)*(1-i/f)^(m+1);
if sum<0,05;
F=[F i];
end
end
Fm=min(F)
end
A=[A Fm];
end
  1 件のコメント
dpb
dpb 2015 年 11 月 25 日
>> factorial(170)
ans =
7.2574e+306
>> factorial(171)
ans =
Inf
>>
In short, "no can do" to evaluate limits via floating point artithmetic; you'll have to approach this in a different manner entirely.
What's the actual problem to be solved?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by