Displaying 1 result from an estimated 1 matches for "calc5".
Did you mean:
calc
2011 Feb 09
2
wrong length error
.../19.3)^(5.3-1))*exp(-(x/19.3)^5.3))
return(calc1)}
fxMixed=function(x){
calc2=(0.12*fxx1(x)+((1-0.12)*fxx2(x)))
return(calc2)}
FxMixed=function(x){
calc3=integrate(fxMixed,0,x)
return(calc3$value)}
RxMixed=function(x){
calc4=(1-FxMixed(x))
return(calc4)}
SUM=function(x){
T1=x[1]
M1=x[2]
n=M1-1
calc5=1:n
for (i in 0:n){
calc5[i]=RxMixed(i*T1)}
sum(calc5)}
V=function(x){
T1=x[1]
M1=x[2]
y=T1*M1
calc6=T1*SUM(x)+0.001*RxMixed(y)+0.00463*FxMixed(y)
return(calc6)}
However, when I try to use the function U, there is an error message and I don't understand what's wrong with my code:
U=funct...