Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
Kazi Alam
Kazi Alam le 15 Juil 2021
Modifié(e) : Kazi Alam le 15 Juil 2021
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)"

Réponse acceptée

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

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by