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?

 Accepted Answer

Stephen23
Stephen23 on 25 Jan 2018
Edited: Stephen23 on 25 Jan 2018
You have a 1x1 cell containing a 5x1 cell, so all you need is this:
str2double(T{1}{5})

More Answers (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.

Categories

Tags

Asked:

on 25 Jan 2018

Commented:

on 25 Jan 2018

Community Treasure Hunt

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

Start Hunting!