For all MATLAB codes written, appropriate comments are required

1. Write a MATLAB user-defined function that finds the index of the maximum absolute value within a range of indices in an array. For example,if we had the array [1 0 -12 14 7], and we called the function with therange 1,3, the function would return 3 as the index of the location of thenumber -12. If the function was called with the range 2,5, the functionwould return 4, the location of 14.2. Write a MATLAB user-defined function that interchanges two rows in amatrix, element by element.3. Write a MATLAB user-defined function to pivot a matrix, if necessary,using the functions written in Parts 1 and 2.4. Write a MATLAB user-defined function to compute a linear combinationof two vectors.5. Write a MATLAB user-defined function to put a matrix into upper-triangularform using the functions written in Parts 3 and 4.6. Draw a flowchart that represents the algorithm to perform back-substitutionon an upper-triangular system of equations.7. Write a MATLAB user-defined function to perform back-substitution ona system of equations in upper-triangular form.8. Combine Parts 5 and 7 into a user-defined function that solves a linearsystem of equations.