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

Change language to:
Français - 日本語 - Português - Русский

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

Scilab Help >> Scilab > Scilab keywords > dollar

dollar

($) last index

Description

The $ symbol denotes the last index (row or column) of the array. It is therefore equal to the number of rows or columns.

The $ symbol is also used to LaTeX texts, which must start and end by $. See also math_rendering_features_in_graphic.

Examples

a=[1,2,3;4,5,6];
a($)

b = [1 2 3;4 5 6;7 8 9];
// Access the last element of first row, i.e. 3
b(1,$)
// Access the last element of second column, i.e. 8
b($,2)
//Access the last element of b, i.e. 9
b($,$)

// Add a row at the end of the matrix b
b($+1,:) = [1 1 1]

// The $ symbol as a LaTeX delimiter
titlepage(['$\Huge\textrm{It is }\LaTeX:$';'$\Huge 2^2+1=\sqrt{25}$'])

See also

Report an issue
<< comparison Scilab keywords dot >>

Copyright (c) 2022-2023 (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:
Mon Feb 12 19:26:46 CET 2018