How to copy text content from a .txt file to a .ats file?

4 ビュー (過去 30 日間)
Yao Li
Yao Li 2014 年 1 月 29 日
回答済み: Yao Li 2014 年 2 月 19 日
Currently, I can only generate a txt file by fprintf(). Then I have to copy and paste the content from the txt file to a .ats. I tried fprintf() directly to a .ats file or copyfile() to a .ats file, but seems the format is incorrect although the file extension is .ats. Any suggestions? I am thinking about create a empty .ats file and copy the text content to the clipboard and then copy the content to the ats file. Is it doable? Or any better solutions?

採用された回答

Yao Li
Yao Li 2014 年 2 月 19 日
Just wanna let you know. I resolved this issue by using
fid=fopen(filename,'wt')
Instead of
fid=fopen(filename,'w')
because the *.ats file requires the ending character of a line to be '\r\n'.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by