采纳的回答

Bhaskar R
Bhaskar R 2020-2-11
编辑:Bhaskar R 2020-2-11
txt = 'text message';
fid = fopen('file.txt', 'wt');
fprintf(fid,'%s', txt);
fclose(fid);

8 个评论

thank you very much it working but some text missing nit all text and not identical to output why?
What are you getting?
not exact text there are some letters repleced with symbols like'?' and not all text saved maybe my text bit about more 1000 character
may text long
"may text long" - Can you provide that text?
ok i will send it when i get my lab top i am using phone now
You may have to use UTF-8 encoding explicitly when writing non-English text.
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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by