Learn R Programming

matlab2r (version 1.5.0)

linspace: Generate linearly-spaced vector

Description

This is a soft wrap around the base::seq() function.

Usage

linspace(x1, x2, n = 100L)

Value

A numeric vector of n numbers between x1 and x2.

Arguments

x1

start point

x2

end point

n

length of output

Author

Waldir Leoncio

Examples

Run this code
linspace(-5, 4)
linspace(1 + 2i, 9 + 9i, 5)

Run the code above in your browser using DataLab