matlabColon {ffmanova}R Documentation

Simulate Matlab's ‘:’

Description

A function to simulate Matlab's ‘:’ operator.

Usage

matlabColon(from, to)

Arguments

from numeric. The start value.
to numeric. The end value.

Details

matlabCode(a,b) returns a:b (R's version) unless a > b, in which case it returns numeric(0).

Value

A numeric vector, possibly empty.

Author(s)

Bjørn-Helge Mevik

See Also

seq

Examples

identical(3:5, matlabColon(3, 5)) ## => TRUE
3:1 ## => 3 2 1
matlabColon(3, 1) ## => numeric(0)

[Package ffmanova version 0.1-1.1 Index]