Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
False: 0
True: 1
Input: parenthesis + need comma
Output: brackets + doesnt need comma
Vectors:
Creating a vector:
V1 = [_ _ _ _ _ _]
V1 = 1:3:12
Indexing a vector:
Shortening Vectors:
V1 = [1,2,3,4,5,6]
V1 = V1([1:2 4:end]) keep elements 1-2 and 4-end. i.e. delete third term
Logical operations on vectors:
Arr
Summing arrays:
Sum(arr) sum of each columns
Sum(sum(arr)) sum of all numbers
Sum(arr) = sum(arr,2) sum of rows
Vertically Concanate
Vertcat(arr1, arr2)
Reshape
Reshape(matrix,#ofrowsthatyouwant, #ofcolumnsthatyouwant)