I need to add / before any underline in strings like "Mean_Tumor_Radius_prolif" so it will be "Mean/_Tumor/_Radius/_prolif".
Any suggestion?

 採用された回答

Bhaskar R
Bhaskar R 2019 年 10 月 18 日

0 投票

There are many ways to do this, the simplest way is by the command "strrep"
str = 'Mean_Tumor_Radius_prolif'
replaced_str = strrep(str, '_', '/_');
replaced_str =
'Mean/_Tumor/_Radius/_prolif'

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCharacters and Strings についてさらに検索

タグ

質問済み:

2019 年 10 月 18 日

回答済み:

2019 年 10 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by