hi, my project running time make me crazy.
I write a script with only 3 " for " but when I click on run button it takes 166 second to run that.
I try it in other computers and Ihave same problem so I realize that the problem is in my script.
with same inputs my friend write another script and we both get same output but his script ran in 3 seconds and my script runs in 166 seconds. (why?) (we have same laptops)
my laptop's specs :
cpu = corei7 5500U
ram = 8 GB
here is my code please tell me where is the problem that I cant get answer in few seconds.
Input = [ 5 12 0.02
4 20 0.1
6 50 0.01
4 76 0.02
3 100 0.04
4 155 0.04
3 197 0.05
1 350 0.08
2 400 0.12];
copt1(i+1,1) = cap(1)*i;
copt1(i+1,2) = (nchoosek(n(1),i))*(FOR(1)^(i))*((1-FOR(1))^(n(1)-i));
COPT(l,1)=cap(i)*j + COPT(k,1);