saving and retrieving string data in matlab

后端 未结 3 543
旧时难觅i
旧时难觅i 2021-01-25 00:24

Hi can any one help me in dealing with strings in MATLAB. For example, the string

A = \'A good looking boy\'

how can we store these individual

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-25 00:54

    The most intuitive way would be using strsplit

    C = strsplit(A,' ')
    

    However as it is not available in my version I suppose this is only a builtin function in matlab 2013a and above. You can find the documentation here.

    If you are using an older version of matlab, you can also choose to get this File Exchange solution, which basically does the same.

提交回复
热议问题