matlab convert matrix to vector starting last element code example

Example 1: call the last element in an array matlab

Indicating indexes between () retrieves corresponding values in Matlab. 
array_borders=array(end)
As end defines the size of the array, retrieve last border value of array.

Example 2: get first and last element of array matlab

Indicating indexes between ([]) retrieves corresponding values in Matlab. 
array_borders=array([1 end])
As end defines the size of the array, retrieve its first and last border values

Tags:

Misc Example