Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

constant_array function

A list of copies of a value.

How to write it

constant_array(x, n)

x
The value. Takes an expression.
n
How many copies. Takes a whole number.

Examples

  • constant_array⁡(0,3)=[0,0,0]\displaystyle \operatorname{constant\_array}(0, 3) = \left[ 0, 0, 0 \right]
    constant_array(0, 3)

    In the solver, constant_array(0, 3) gives [0, 0, 0].

    Open in the solver
  • count

    How many elements of a list equal a value.

  • complement

    The elements of a list that are in none of the others.

  • dimensions

    The size of a list or a matrix, level by level.

  • apply

    Replace the head of an expression, or the brackets of a list, with a function.

  • drop

    A list without its first elements.

  • append

    A list with an element added at the end.