How to print text in an existing txt file in an existing txt file?
2 views (last 30 days)
Show older comments
Edited: Benson Gou on 10 May 2020
I tried the following cases:
1. fprintf('Hello <strong>bold</strong> world.\n')
2. fileID = fopen('GeneralResults.txt','w');
fprintf(fileID, 'Hello <strong>bold</strong> world.\n')
Case 1 worked well, but case 2 does not work. The only difference is 'fileID'.
I am wondering why I cannot write it in a file named "GeneralResults.txt".
Thanks a lot.
Hrijul Shende on 9 May 2020
More Answers (0)
Find more on Downloads in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!