How to adress string within cell array?

I have a cell T =
cell
{5×1 cell}
and would like to extract the last item ('100.7') in this cell and convert to number (str2num) T{:}
ans =
5×1 cell array
'#'
'Ambient'
'pressure'
':'
'100.700'
Any tips?

 采纳的回答

You have a 1x1 cell containing a 5x1 cell, so all you need is this:
str2double(T{1}{5})

更多回答(1 个)

sorry did not work...
K>> str2double(T{5}) Index exceeds matrix dimensions.
K>> T
T =
cell
{5×1 cell}
K>> T{5} Index exceeds matrix dimensions.
K>> T{5,1} Index exceeds matrix dimensions.

类别

在 帮助中心 和 File 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