sorting data in a nested cell

1 visualización (últimos 30 días)
Susan Santiago
Susan Santiago el 8 de Oct. de 2018
Comentada: madhan ravi el 13 de Oct. de 2018
I have a cell C that looks like this
The cells in the first column are all some numberx14. I want to sort C in ascending order based on the values of the first column of data in the cells in the first column of cell C. How would I go about doing that? I'm getting very confused with indexing for cells like this and just want to rearrange the cell.

Respuesta aceptada

amin ya
amin ya el 9 de Oct. de 2018
Editada: amin ya el 9 de Oct. de 2018
You need to write a for loop and use classic sort algorithm. I had this problem, but there is no easy way to access or sort the data of matrixes inside the cell.
For example, you can access the first element of a matrix in the (1,1) element of the cell like this:
A{1,1}(1,1)
Change these algorithms to suit your application:
  1 comentario
madhan ravi
madhan ravi el 13 de Oct. de 2018
+1 vote @amin ya smooth crystal clear

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by