extract a number within brackets from a cell of a table

2 views (last 30 days)
I have this inside a cell of a table:
(2.59836893721600e+01dB,0.00000000000000e+00°)
and I need to extract:
2.59836893721600e+01
Thanks in advance

Answers (1)

Stephen23
Stephen23 on 12 May 2022
txt = '(2.59836893721600e+01dB,0.00000000000000e+00°)'
txt = '(2.59836893721600e+01dB,0.00000000000000e+00°)'
num = sscanf(txt,'(%f')
num =
25.98368937216

Categories

Find more on Tables in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!