|
Hi all,
Sorry, I have one more question. If I have an the original matrix with values and the order of the elements in each column. For example,
test_input =
81 10 16
91 28 97
13 55 96
91 96 49
63 96 80
test_order =
5 2 5
2 1 4
1 3 1
3 4 3
4 5 2
I want to rearrange the elements in each column of 'test_input' according to the order in the 'test_order', so the output that I am looking for is
test_output =
63 28 80
91 10 49
81 55 16
13 96 96
91 96 97
I tried 'test_input(test_order)', but it did not work. Is there a column function that I can use here. Thank you very much.
Wendy
"Wendy " <wlq121@gmail.com> wrote in message <ie3cll$3t1$1@fred.mathworks.com>...
> Yes, it worked. Thanks so much.
>
> Wendy
>
>
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ie3bt8$lsp$1@fred.mathworks.com>...
> > [~, A] = sort(rand(5,3))
> >
> > Bruno
|