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
('s version) unless a > b
,
in which case it returns integer(0)
.
Value
A numeric vector, possibly empty.
Author(s)
Bjørn-Helge Mevik
See Also
Examples
identical(3:5, matlabColon(3, 5)) ## => TRUE
3:1 ## => 3 2 1
matlabColon(3, 1) ## => integer(0)
[Package ffmanova version 1.1.2 Index]