Computer Science, asked by 183r1a0474, 6 hours ago

write a Matlab program to sort vector V=[23 45 12 9 5 0 19 17] using Matlab commands?​

Answers

Answered by yanaiduay
1

Answer:

I don't know maths property sorry

mark as brilliant

Answered by anjumanyasmin
0

From the given question the answer is:

v = [ 23 45 12 9 5 0 19 17]  % horizontal vector

sort(v)                      % sorting v

m = [2 6 4; 5 3 9; 2 0 1]    % two dimensional array

sort(m, 1)                   % sorting m along the row

sort(m, 2)                   % sorting m along the column

When you run the file, it displays the following result −

v =

  23    45    12     9     5     0    19    17

ans =

  0     5     9    12    17    19    23    45

m =

  2     6     4

  5     3     9

  2     0     1

ans =

  2     0     1

  2     3     4

  5     6     9

ans =

  2     4     6

  3     5     9

  0     1     2

Similar questions