Displaying 2 results from an estimated 2 matches for "calc2".
Did you mean:
calc
2011 Feb 09
2
wrong length error
...zation problem with two
variables, in wich Iuse the following functions(they all are working
perfectly):
fxx1=function(x){
calc=((2.5/3)*((x/3)^(2.5-1))*exp(-(x/3)^2.5))
return(calc)}
fxx2=function(x){
calc1=((5.3/19.3)*((x/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){...
2008 Jun 29
3
Interactive plot
Hi all,
I have created following codes :
mat = cbind(c(0.000059710430,0.000023057380), c(0.000023057380, 0.00005971089))
set.seed = 1000
vary = runif(dim(mat)[1], 2000, 3000)
calc = function(mat, vary)
{
result = vector(length = (length(vary)+1))
result[1] = sqrt(t(vary) %*% vary)
for (i in 1 : length(vary))
{
result[(i+1)] = sum(vary)*sum(vary*mat[,i])