OKPEDIA SCILAB EN

How to make a vector with Scilab

To make a vector with Scilab

vec = [e1 e2 e3 ...]

The elements of the vector must be indicated in square brackets [] and separated from each other by a space.

The vector name is on the left of the equal symbol.

Example

Create two vectors with 4 elements.

v1 = [1 2 3 4]
v2 = [5 6 7 8]

Add the two vectors

v1+v2

The result of the vector sum is

ans = 6. 8. 10. 12.

https://how.okpedia.org/en/scilab/how-to-make-a-vector-with-scilab


Report an error or share a suggestion to enhance this page


Scilab


FacebookTwitterLinkedinLinkedin