tests/fix.R

###
### $Id: fix.R 22 2022-05-30 18:03:47Z proebuck $
###


##-----------------------------------------------------------------------------
test.fix <- function(input, expected) {
    output <- do.call(getFromNamespace("fix", "matlab"), input)
    identical(output, expected)
}

X <- c(-1.9, -0.2, 3.4, 5.6, 7.0)
fix.expected <- c(-1, 0, 3, 5, 7)

test.fix(list(X), fix.expected)

Try the matlab package in your browser

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

matlab documentation built on July 1, 2024, 5:07 p.m.