Convert Cells into matrixs

2 次查看(过去 30 天)
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!!

采纳的回答

Walter Roberson
Walter Roberson 2017-4-12
result = cellfun( @(V) V(end), YourCellArray )

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by