https://github.com/cran/pracma
Raw File
Tip revision: a850b1ad48fcaac7a21cb289147c932e23b23acb authored by HwB on 15 July 2011, 00:00:00 UTC
version 0.7-3
Tip revision: a850b1a
hankel.R
##
##  hankel.R  Test
##

hankel <- pracma::hankel

identical(hankel(2), matrix(2, nrow=1, ncol=1))
identical(hankel(1:3), matrix(c(1,2,3,2,3,0,3,0,0), 3, 3))
identical(hankel(1:3, 3:1), matrix(c(1,2,3,2,3,2,3,2,1), 3, 3))
identical(hankel(1:3, 2:1), matrix(c(1,2,3,2,3,1), 3, 2))
identical(hankel(1:2, 3:1), matrix(c(1,2,2,2,2,1), 2, 3))
back to top