Sort 1D array with three methods using MATLAB: 1. 'selection' 2. 'insertion' 3. 'BubbleSort' A simple exercise to better understand the method for sorting a 1D array.
How to use: Example: input = [2 9 3 10 1 2 43 3 23 101 0.1 -0.2]; output = sort1DArray(input,'ascend','insertion');