Professional Documents
Culture Documents
-->V1=[1 2 3 4]
V1 =
1. 2. 3. 4.
-->
-->V2=[1;2;3;4]
V2 =
1.
2.
3.
4.
-->
Keep in mind that for Scilab there is no difference between a vector or a matrix. Only the dimension is
different between them, all variable are of type “Double”:
Image: Variable Browser in Scilab
Once you have defined a matrix if you want to change some of it’s values there are two options. First is to
rewrite the value that needs to be changed by pointing what row and column within the matrix is to be
changed:
-->A(2,3)=60
A =
1. 2. 3. 4.
5. 6. 60. 8.
-->
In this example we changed the value of the element from matrix A positioned in row 2 and column 3.
Previously this value was 6 and after that we redefined it to 60.
Vectors
Operations: w=u+v
Dimensions: size(v) will print out the number of rows and columns
in v
Transpose: A’
Multiplication: A*B
Eigenvalues/eigenvectors: