How to strrep only certain strings
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Michael Boyle
le 18 Oct 2021
Modifié(e) : Bruno Luong
le 18 Oct 2021
I have a cell array with values like e-.00085 and 8.5e-4. I am trying to replace the 'e' with nothing '' in the value with the leading e, while leaving the scientific notation e alone.
x = ['e-.00085';'8.5e-4'];
strrep(x,'e','');
desired_final_ans = ['-.00085';'8.5e-4'];
Is there a way to determine in an if statement whether the cell begins with an 'e'?
2 commentaires
Bruno Luong
le 18 Oct 2021
Modifié(e) : Bruno Luong
le 18 Oct 2021
The questions are not the same strickly speaking.
Réponse acceptée
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Cell Arrays dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!