# data[].attributes.body
if mat = [1:3; 44 9 2; 5:-1:3]
then in MATLAB this becomes

# data[].attributes.body
In the first and 3rd row, the colon operator is used. This takes the form min_value:int:max_value. The colon operator creates a vector starting at the min_value, incrementing by int and ending at max_value.
In the 3rd row, the -1 makes the vector count down (negative interval)

# data[].attributes.body
The semi-column that appears twice in the mat definition line tells MATLAB to move to the next row in the matrix.

# data[].attributes.body
The following shows how to take out one element of the matrix mat and save it as a new variable a.

# data[].attributes.body
We use this outcome frequently in this class and I feel confident in my ability to declare and use matrices - including vectors and scalars in MATLAB. Another place I used this outcome was in Lab 2 and Lab 3 and in the 2nd project. When I approach new problems, I look for ways to vectorize the code and create arrays, keeping similar data together.

# data[].attributes.body
mat + 2 will add 2 to each element
mat * 2 will multiple each element by 2.