remove occurrences of given characters in a string using find and []
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Britnie Casillas
am 26 Okt. 2019
Kommentiert: Britnie Casillas
am 26 Okt. 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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!