How can i sort matrix (all rows) according to specific colums?

Hi,
I would order a matrix according on values in specific columns.
My matrix is T = [[DICTIONARY.IC.len DICTIONARY.IC.vx DICTIONARY.IC.vy DICTIONARY.IC.vz DICTIONARY.IC.ox DICTIONARY.IC.oy DICTIONARY.IC.fiber]
where DICTIONARY.IC.xxx are column vectors.
I would like sort it according on the values of DICTIONARY.IC.vx DICTIONARY.IC.vy DICTIONARY.IC.vz and i use the command:
Tsort = sortrows (T, [2 3 4]);
but obtain the following error:
??? Error using ==> sortrowsc Out of memory. Type HELP MEMORY for your options.
Error in ==> sortrows at 74 ndx = sortrowsc(x_sub, col);
Error in ==> main at 43 Tsort = sortrows (T, [2 3 4]);
Why?
Thanks, Davide

1 Comment

'Cuz T is quite large, most likely and you've got multiple copies?
Try
clear DICTIONARY
first after creating the array and see if that will give you sufficient memory to proceed.

Sign in to comment.

Answers (0)

Categories

Tags

Asked:

on 19 Jul 2014

Commented:

dpb
on 19 Jul 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!