Borrar filtros
Borrar filtros

How to replace on the decimal number only in alphannumeric array?

1 visualización (últimos 30 días)
Hallo, Thanks for reading:
How to replace on the floating number only?
A =
" (:PAR :N X :V 0.0)"
" (:PAR :N Y :V 0.0)"
" (:PAR :N DX :V 2.0)"
" (:PAR :N DY :V 2.0)"

Respuesta aceptada

Kazi Alam
Kazi Alam el 15 de Jul. de 2021
Found it
out=regexp(A,'\d?\.?\d+','match')
strrep(A(1),out{1},'2.2')

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by