Convert Cells into matrixs

1 visualización (últimos 30 días)
Lucas Neves
Lucas Neves el 12 de Abr. de 2017
Comentada: Lucas Neves el 14 de Abr. de 2017
I have a 5x9 cell and i want to create a matrix with the valeus from this cells. The problem is that this cells have values like
1x100 2 1x100 4 5 6 7
1x100 2 1x100 4 5 6 7
1x100 2 1x100 4 5 6 7
1x100 2 1x100 4 5 6 7
1x100 2 1x100 4 5 6 7
I want the matrix to be:
'Last Value from 1x100' 2 'Last Value from 1x100' 4 5 6 7
'Last Value from 1x100' 2 'Last Value from 1x100' 4 5 6 7
'Last Value from 1x100' 2 'Last Value from 1x100' 4 5 6 7
'Last Value from 1x100' 2 'Last Value from 1x100' 4 5 6 7
'Last Value from 1x100' 2 'Last Value from 1x100' 4 5 6 7
Any ideas? Thanks!!

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Abr. de 2017
result = cellfun( @(V) V(end), YourCellArray )
  1 comentario
Lucas Neves
Lucas Neves el 14 de Abr. de 2017
You sir, are a legend! Hahahaha Thank you!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion 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