<< mps_inv mpscilab mps_log >>

mpscilab >> mpscilab > mps_linspace

mps_linspace

Set or create a linearly spaced vector

Calling Sequence

mps_linspace( rop, start, end )
rop = mps_linspace( start, end, n, prec )

Arguments

rop

multi-precision matrix

start, end

Multi-precision or Scilab matrices

n, prec

Integer scalars

Description

Set or create a linearly spaced vector between start and end.

mps_linspace( rop, start, end )

Set rop with equally spaced values between start and end.

rop = mps_linspace( start, end, n, prec )

Creates an MPS vector rop of size 1xn with precision prec. The created vector is filled with equally spaced values between start and end.

Examples

//Fill an existing 10 elements vector with values from 2 to 6.
mpsA = mps_init( 1, 10, 100 );
mps_linspace( mpsA, 2, 6 );

//Same as above in one line.
mpsA = mps_linspace( 2, 6, 10, 100 );

See Also

<< mps_inv mpscilab mps_log >>