I would like to convert a string into a cell array. Here is a small example of string:
[{"ts": "2018-07-03T06:30:07", "v": 1.0}, {"ts": "2018-07-03T06:30:12", "v": 0.0}, {"ts": "2018-07-03T08:41:06", "v": 1.0}]
I would like to convert this into the following format:
[ datetime ] [number]
The ts and v refer to timestamp and value, and are not important to keep.
I believe using the textscan is an efficient way to do it, however I cannot figure out how to use it properly, any help is appreciated!
Best Answer