필터 지우기
필터 지우기

How to print text in an existing txt file in an existing txt file?

조회 수: 3 (최근 30일)
Benson Gou
Benson Gou 2020년 5월 9일
편집: Benson Gou 2020년 5월 10일
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

채택된 답변

Hrijul Shende
Hrijul Shende 2020년 5월 9일
See https://in.mathworks.com/matlabcentral/answers/22744-how-to-bold-italics-sentence-using-fprintf-in-matlab#answer_29925
  댓글 수: 1
Benson Gou
Benson Gou 2020년 5월 9일
편집: Benson Gou 2020년 5월 9일
Hi, Hrijul, I checked this website before I submitted my question. The example I used is from that website. Thanks a lot, anyway. Benson

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by