search for: termcd

Displaying 3 results from an estimated 3 matches for "termcd".

Did you mean: term'd
2017 Aug 09
2
Package nleqslv ERROR
...x(0,nrow=9*9*9,ncol=6) startx<-c(16350, 1.33) indx <- 1 for (i in 1:9) { for (j in 1:9) { for (k in 1:9) { f.startx <- fun(startx) if(anyNA(f.startx)) { Result[indx,1:3] <- NA } else { z <- nleqslv(startx,fun) Result[indx,1:3] <- c(z$termcd,z$x) } Result[indx,4:6] <- c(i,j,k) indx <- indx+1 } } } The error i get when solving for specific values of ALPHA, BETA and GAMMA, not using the loop is: Error in nleqslv(xstart, fun) : Length of fn result <> length of x! I had already solved this problem us...
2017 Aug 09
0
Package nleqslv ERROR
...1.33) > indx <- 1 > for (i in 1:9) { > for (j in 1:9) { > for (k in 1:9) { > f.startx <- fun(startx) > if(anyNA(f.startx)) { > Result[indx,1:3] <- NA > } else { > z <- nleqslv(startx,fun) > Result[indx,1:3] <- c(z$termcd,z$x) > } > Result[indx,4:6] <- c(i,j,k) > indx <- indx+1 > } > } > } > > > The error i get when solving for specific values of ALPHA, BETA and GAMMA, not using the loop is: > > Error in nleqslv(xstart, fun) : Length of fn result <> len...
2010 Mar 11
4
help about solving two equations
I have two matrix s1 and s2, each of them is 1000*1. and I have two equations: digamma(p)-digamma(p+q)=s1, digamma(q)-digamma(p+q)=s2, and I want to sovle these two equations to get the value of x and y, which are also two 1000*1 matrices. I write a program like this: f <- function(x) { p<- x[1]; q <- x[2]; ((digamma(p)-digamma(p+q)-s1[2,]) )^2 +((digamma(q)-digamma(p+q)-s2[2,]) )^2