extract a number within brackets from a cell of a table

1 visualización (últimos 30 días)
James Palmer
James Palmer el 12 de Mayo de 2022
Respondida: Stephen23 el 12 de Mayo de 2022
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

Respuestas (1)

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

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by