tests/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))

Try the pracma package in your browser

Any scripts or data that you put into this service are public.

pracma documentation built on Nov. 10, 2023, 1:14 a.m.