how i can wtite or save output "text message' in file.txt

 채택된 답변

Bhaskar R
Bhaskar R 2020년 2월 11일
편집: Bhaskar R 2020년 2월 11일

0 개 추천

txt = 'text message';
fid = fopen('file.txt', 'wt');
fprintf(fid,'%s', txt);
fclose(fid);

댓글 수: 8

Yusuf lamah
Yusuf lamah 2020년 2월 11일
thank you very much it working but some text missing nit all text and not identical to output why?
Bhaskar R
Bhaskar R 2020년 2월 11일
What are you getting?
Yusuf lamah
Yusuf lamah 2020년 2월 11일
not exact text there are some letters repleced with symbols like'?' and not all text saved maybe my text bit about more 1000 character
Yusuf lamah
Yusuf lamah 2020년 2월 11일
may text long
Bhaskar R
Bhaskar R 2020년 2월 11일
"may text long" - Can you provide that text?
Yusuf lamah
Yusuf lamah 2020년 2월 11일
ok i will send it when i get my lab top i am using phone now
Rik
Rik 2020년 2월 11일
You may have to use UTF-8 encoding explicitly when writing non-English text.
Yusuf lamah
Yusuf lamah 2020년 2월 15일
thanks alot for all its ok

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

추가 답변 (1개)

fred  ssemwogerere
fred ssemwogerere 2020년 2월 11일

0 개 추천

You can use fprintf. The link below should give you more clarity based on the data you are saving:

카테고리

도움말 센터File Exchange에서 Language Support에 대해 자세히 알아보기

제품

릴리스

R2016a

태그

질문:

2020년 2월 11일

댓글:

2020년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by