Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
textfile
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
i have written a code in matlab gui which generates a text file and prints some text in it.i want to print a value in the very first line of this text file and each time the code run the value is to be replaced in the very first line while the remaining reading of text file start from second line,any command to adjust the line to be read or print will be helpful
0 Kommentare
Antworten (2)
Walter Roberson
am 16 Jul. 2011
Replacing a line of text in a file is only possible if the replacement text is exactly the same size as the original. If the new text would be smaller than the original, you would have to pad the new text out to be exactly the same size as the old text. If the new text would be larger than the old text, then you end up having to rewrite the entire file.
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!