Add / before _ in a string
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Zeynab Mousavikhamene
el 18 de Oct. de 2019
Respondida: Bhaskar R
el 18 de Oct. de 2019
I need to add / before any underline in strings like "Mean_Tumor_Radius_prolif" so it will be "Mean/_Tumor/_Radius/_prolif".
Any suggestion?
0 comentarios
Respuesta aceptada
Bhaskar R
el 18 de Oct. de 2019
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!