Removing semicolons from data
이전 댓글 표시
I have a dataset from a fitbit that gives e.g. steps per minute. The steps are data I can create an array from but the timedata is between semicolons which seems to give problems. Below is a picture of how the data is presented. And here is the code I used to retrieve it:
str = fileread('12h.json'); % dedicated for reading files as text
data = jsondecode(str); % Using the jsondecode function to parse JSON from string to a Matlab struct.
step_data = data(1).data.data.activities_steps_intraday;
step_data = struct2cell(step_data);
time = cell2mat(step_data(1,:));
step = cell2mat(step_data(2,:));
How do I create an array for time from this data?

Here is how the data is converted at this moment:

채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 JSON Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!