Windows(CR LF) to Unix (LF)

65 ビュー (過去 30 日間)
Matthew Tyler Jeffries
Matthew Tyler Jeffries 2019 年 3 月 13 日
編集済み: per isakson 2019 年 3 月 14 日
I am using the matlab function "writetable" to creat a .txt file that I can open with Notepad++. However, Notepad++ opens the document as Windows (CR LF), but I would like it to automatically open it as Unix (LF). Is there a code I can use in matlab to fix this?
Thank you.

採用された回答

per isakson
per isakson 2019 年 3 月 14 日
編集済み: per isakson 2019 年 3 月 14 日
You have a few options
  • Open the file in Notepad++ and replace CRLF by LF as shown by the screen clip below.
  • Use the solution, "Better control of the format", which I provided in my answer to your previous question. AFAIK: writetabel() doesn't let you control the new line character.
  • Use writetable() and thereafter read the file, replace CRLF by LF, and overwrite the text file.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by