(Bubble Sort) Bubble Sort is another sorting algorithm based on an outer iteration and an inner iteration. Through each iteration of the outer iteration, the largest entries in the unsorted portion will be "bubbled" to the top. The inner iteration passes over the unsorted list and successively swaps all adjacent entries which are out of order with respect to each other. The code for this should consist of an outer loop and an inner loop. Your input will be an arbitrary-length (row) vector, and you will produce a matrix where the first row is the initial vector and each subsequent row is the result of one pass of the outer loop. See below for sample runs.
Bubble Sort Function:
Input variables: vector of unsorted data
Output variables: matrix of the results after each pass of the outer loop
Possible sample case is:
data data
bubble_sort([1
53])
data data
bubble_sort([2 3
5 1])