Escape characters in Matlab

前端 未结 2 654
野趣味
野趣味 2021-01-21 14:30

I am reading a file using fileread() which returns me the entire file. Now I need to read line by line and convert them into process the data. Can I know how I would be able to

2条回答
  •  温柔的废话
    2021-01-21 14:58

    For special acharacters either use the char function with the character code (http://www.asciitable.com/) or sprintf (my preferred way for better readability. For example you are looking for sprintf('\n') or sprintf('\r\n')

    char(13) is carriage return \r char(10) is new line \n

提交回复
热议问题