https://github.com/cran/pracma
Revision d57c14d79af36feb7376258875e720ceffcc1312 authored by Hans W. Borchers on 11 October 2014, 00:00:00 UTC, committed by Gabor Csardi on 11 October 2014, 00:00:00 UTC
1 parent c79a04b
Tip revision: d57c14d79af36feb7376258875e720ceffcc1312 authored by Hans W. Borchers on 11 October 2014, 00:00:00 UTC
version 1.7.3
version 1.7.3
Tip revision: d57c14d
vander.R
###
### VANDER.R Vandermonde matrix
###
vander <- function(x) {
n <- length(x)
if (n == 0) return(matrix(0, nrow=0, ncol=0))
if ((!is.numeric(x) && !is.complex(x)) || is.array(x))
stop("Argument 'x' must be a numeric or complex vector.")
A <- outer(x, seq(n-1, 0), "^")
return(A)
}
Computing file changes ...