0

I have a unsorted array

A =

10   -12     4     8
 6    -9     8     0
 2     3    11    -2
 1     1     9     3

I want to get it sorted fully and have the following result

A =

-12   -9    -2    0
 1     1     2    3
 3     4     6    8
 8     9    10   11

how can i do that?

Please help.

Thanks in advance :)

2
  • i want this way A = [-12 -9 -2 0; 1 1 2 3; 3 4 6 8; 8 9 10 11] Commented Mar 7, 2016 at 10:11
  • If you need to add information or otherwise change your question, please just edit the question. Commented Mar 7, 2016 at 10:28

1 Answer 1

3

Do this:

A = sort(reshape(A,[1 16]));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.