matlab - Inf value after incrementation -
matlab - Inf value after incrementation -
here's code:
x=0; i=1:100 x=x+sqrt(((1/((((2*i)-2)^2)*(((2*i)+2)^2)))*16)+8); end
for reason maintain getting infinity value (inf) x after operation???
can help explain why?
that because split 0 @ i==1
: take @ (2*i)-2
i==1
.
i can guess meant utilize i
imaginary square root of -1
. in case, alter loop to:
x=0; k=1:100 x=x+sqrt(((1/((((2*i)-2)^2)*(((2*i)+2)^2)))*16)+8); end
and in that case loop not necessary @ all.
matlab increment infinity
Comments
Post a Comment