How to print text in an existing txt file in an existing txt file?
1 次查看(过去 30 天)
显示 更早的评论
Dear All,
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.
Benson
0 个评论
采纳的回答
Hrijul Shende
2020-5-9
See https://in.mathworks.com/matlabcentral/answers/22744-how-to-bold-italics-sentence-using-fprintf-in-matlab#answer_29925
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!