How can i sort matrix (all rows) according to specific colums?
Mostrar comentarios más antiguos
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 comentario
dpb
el 19 de Jul. de 2014
'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.
Respuestas (0)
Categorías
Más información sobre Shifting and Sorting Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!