Vector in Octave is similar to the array in every aspect except the vector size is dynamic, which means its size can be increased however array does not allow such type of increment in its size.
Types of Vectors
- Row Vector
- Column Vector
Row vectors are created by enclosing the set of elements in square brackets, using space or comma to delimit the elements.
1 2 3 4 5 1 2 3 4 5
Column vectors are created by enclosing the set of elements in square brackets, using a semicolon to delimit the elements.
1 2 3 4 5
Accessing Elements in a Vector in Octave GNU : A vector element is accessed using the index of that element. The indexing starts from 1(not from 0). Language like C++, Java uses index from 0 to size-1, whereas in OCTAVE GNU index starts from 1 and ends at size; Also C++, java uses  (Square Bracket) to access elements using index but in OCTAVE GNU parenthesis are used to access elements using the index.
Element at Vector(1) is 10 Element at Vector(2) is 20 Element at Vector(3) is 30 Element at Vector(4) is 40 Element at Vector(5) is 50