.ModelicaReference.Operators.'linspace()'

Information

Return Real vector with equally spaced elements

Syntax

linspace(x1, x2, n)

Description

Returns a Real vector with n equally spaced elements, such that

v[i] = x1 + (x2-x1)*(i-1)/(n-1) for 1 ≤ i ≤ n.

It is required that n ≥ 2. The arguments x1 and x2 shall be Real or Integer scalar expressions.

Examples

Real v[:] = linspace(1,7,4);  // = {1, 3, 5, 7}

Generated at 2019-07-17T01:39:38Z by OpenModelicaOpenModelica 1.14.0~dev-26604-gbda57e7 using GenerateDoc.mos