Displaying 3 results from an estimated 3 matches for "zvec".
Did you mean:
vec
2007 Feb 27
1
Additional args to fun in integrate() not found?
...F = function(yvec, p=2, mu=0, scale=1, numint=0)
{
#-------------------------------------------------------------------------
#Setting k to sqrt(2) and the GED with p=2 coincides with standard normal.
#Set k=1 and GED with p=1 coincides with Laplace.
k<-sqrt(2)
#k<-1
scale<-scale*k
zvec<-(yvec-mu)/scale
cdf<-matrix(0, length(zvec),1)
for(i in 1:length(zvec))
{
z<-zvec[i]
if(numint==0)
{
if(z<=0)
{
t<-0.5*(1-1/gamma(1/p)*Igamma((1/p),(-z)^p,lower=TRUE))
}
else
{
t<-1-(0.5*(1-1/gamma(1/p)*Igamma((1/p),(z)^p,lower=TRUE )))
}
}
else
{...
2011 May 02
2
easy way to do a 2-D fit to an array of data?
...single, convex peak, I would like to do a 2D parabolic fit of the form
Z = poly((x+y),2) where x and y are the x,y coordinates of each pixel
(or equivalently, the row, column numbers).
Is there an R function that lets me easily implement that? I've started
down the path of something like
zvec <- as.vector(Z), and creating applicable x,y vectors by something
like (where for the sake of argument Z is 128x128)
foo<-matrix(seq(1,128),128,128)
xvec <- as.vector(foo)
yvec <- as.vector(t(foo))
at which point I can feed zvec, xvec, yvec to lm() .
I'm hopeful someone can...
2012 Mar 09
2
rgl: cylinder3d() with elliptical cross-section
For a paper dealing with generalized ellipsoids, I want to illustrate in
3D an ellipsoid that is unbounded
in one dimension, having the shape of an infinite cylinder along, say,
z, but whose cross-section in (x,y)
is an ellipse, say, given by the 2x2 matrix cov(x,y).
I've looked at rgl:::cylinder3d, but don't see any way to make it
accomplish this. Does anyone have
any ideas?
thx,