Research the Octave commands that can be used to sort a 1dim

Research the Octave commands that can be used to sort a 1-dimensional array into ascending order or descending order. Test these commands on the array A = [3 5 2 6 1].

i need octive code or matlab coden

Solution

1.B = sort(A) sorts the elements of A in ascending order along the first array dimension whose size does not equal 1.

2.If A is a vector, then sort(A) sorts the vector elements.

3.If A is a matrix, then sort(A) treats the columns of A as vectors and sorts each column

4.If A is a multidimensional array, then sort(A) operates along the first array dimension whose size does not equal 1, treating the elements as vectors.

For

Research the Octave commands that can be used to sort a 1-dimensional array into ascending order or descending order. Test these commands on the array A = [3 5

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site