Dear Sir/Madam,
If I have matrics as follows:
a - c(1,1,0,0)
b - c(4,4,0,0)
c - c(3,5,5,6)
How can I use R code to solve the equation ax^2+bx+c=0.
thanks!
yuying shi
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing
Dear Sir/Madam,
If I have matrics as follows:
a - c(1,1,0,0)
b - c(4,4,0,0)
c - c(3,5,5,6)
How can I use R code to solve the equation ax^2+bx+c=0.
thanks!
yuying shi
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing
!= 0) {y.solution[1]- -1*c/b}
} else
## Put your R code here
} else
{
## Put your R code here
}
y.solution
}
# Interate through the coefficients
y - matrix(0,nrow=4,ncol=4)
for (k in 1:4)
{
y[k,] -SolveQuad(a[k],b[k],c[k])
}
y
Thanks very much for all the help!
yuying shi
[[alternative
If I have matrics as follows:
a - c(1,1,0,0)
b - c(4,4,0,0)
c - c(3,5,5,6)
How can I use R code to solve the equation ax^2+bx+c=0.
thanks!
yuying shi
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https
Dear R expert,
The following is my questions:
1. How to generate two sequences of 150 uniform
deviates, called v1 and v2, in the range [-1,1].
2. How to compute r=(v1)^2+(v2)^2
3.If r is outside the range of (0,1) then it will be
discarded.
4 How to compute (v1)*sqrt(-2*log(r)/r) and output
help is greatly appreciated. Thanks in advance!
best wishes
yuying shi
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R
Dear Sir/Madam,
If I have a sample of observations that come from
an extreme value distribution, the density function
for the extreme value distribution is:
f(x)=(1/b)exp[-(x-a)/b]exp{-exp[-(x-a)/b]}, b0, x can
be any value,
my question is how to implement the Newton iteration
and
If there are two random variable X1 and X2 which have
a bivariate normal distribution with mean vector (10,
10)and variance covariance matrix
[21.95
1.953]
How to calculate the mean and variance of the function
Y=X1/X2?
Thanks a lot!
xingyu