Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.3.0 - English

Change language to:
Français - 日本語 - Português

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab manual >> Scilab > Scilab keywords > colon

colon

(:) colon operator

Description

Colon symbol : can be used to form implicit vectors. (see also linspace, logspace)

j:k

is the vector [j, j+1,...,k] (empty if j>k).

j:d:k

is the vector [j, j+d, ..., j+m*d]

The colon notation can also be used to pick out selected rows, columns and elements of vectors and matrices (see also extraction,insertion)

A(:)

is the vector of all the elements of A regarded as a single column.

A(:,j)

ys the j-th column of A

A(j:k)

is [A(j),A(j+1),...,A(k)]

A(:,j:k)

is [A(:,j),A(:,j+1),...,A(:,k)]

A(:)=w

fills the matrix A with entries of w (taken column by column if w is a matrix).

<< case Scilab keywords comma >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Wed Jan 26 16:23:36 CET 2011