remove occurrences of given characters in a string using find and []
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Britnie Casillas
le 26 Oct 2019
Commenté : Britnie Casillas
le 26 Oct 2019
function f=test(s,c)
f=regexp(find(s=='c'))=[];
end
my s='now is the time for all good'
I am trying to remove all the o's in the sentence. However, when I go to test it I get an error with the second eqal sign --> =[];
it says incorrect use of '=' operator. However, when I try to change it, i still get the same error.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Characters and Strings 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!