⇐ back

    Creating a vector

    to create a vector:

    create new vector by listing all it's elements in angle brackets:

    ex12

    you can use a sequence of numbers using default step = 1:

    ex13

    or using specified step:

    ex15

    all these approaches can be combined together:

    ex15-1

    resultant vector will contain such elements:

    0, 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, -4, 0.8

    you can create new vectors by using existing vectors as inputs:

    ex14

    vector is actually a one-dimensional array of elements. Used in mathematical expressions "as is" vector is treated as geometrical entity, i.e. it can be multiplied by a number, added to another equal length vector, or scalar multiplied by another equal length vector. However, vector has several other useful applications, e.g. it is being used to control loops, to create other vectors or matrices.

    to refer single element of a vector use indexes:

    ex17