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

2 次查看(过去 30 天)
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)"

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by