How can I remove double quotes from a string?

76 views (last 30 days)
Heidi Hirsh
Heidi Hirsh on 10 Dec 2018
Commented: Walter Roberson on 17 Jul 2020
I am reading in data from a .csv file using textread. The data looks like this:
I can read in date, time, and temperature as strings but then I am left with the values in double quotes. Is there a way to read the values in some other way so I that I am left withouth the data in double quotes?

Answers (2)

Mark Thomson
Mark Thomson on 17 Jul 2020
Hi, I found readtable.m a bit slow.
You can also try this:
strs={'"Hi there"','"Joe"'} % Example cell array of strings with "..."
I borrowed the regexp syntax from:
  1 Comment
Walter Roberson
Walter Roberson on 17 Jul 2020
[^""] is any one character that is not either " or " -- in other words it is the same [^"]

Sign in to comment.

Sean de Wolski
Sean de Wolski on 10 Dec 2018
Use readtable.

Community Treasure Hunt

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

Start Hunting!