how can I delete from a string a couple of lines I have indexed
Ältere Kommentare anzeigen
Hi so I've got a string and I've got a variable that contains the position of different messages from the string. How could I delete the lines I got in the variable?
Akzeptierte Antwort
Weitere Antworten (1)
Are you looking for something like this?
str = ["line 1";"line 2";"line 3";"line 4";"line 5"]
var = [2 3];
str(var)=[]
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!