How to import numerical columns as strings?

2 views (last 30 days)
Xiaoyu Xu
Xiaoyu Xu on 9 Dec 2019
Commented: Stephen23 on 9 Dec 2019
I am trying to import data from a .tsv file by using tdfread. One of the variables take values like "0000897069-09-001106". Matlab mistakenly imports it as numerical (897069). How can I import it as a string?
  1 Comment
Stephen23
Stephen23 on 9 Dec 2019
"How can I import it as a string?"
Import the filedata using textscan, specifying the format yourself.

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!