I have one-day travel survey data that I want to use for my project. I need to format this survey data to make it usable for my program. The raw data has several trips data which is sorted according to USER ID. Each USER makes several trips in one day, and I have sorted these user trips into a cell array, where each array holds the information for all the trips made by ONE user. Now I want to transform this rows in each cell into something like this:
[[[87 2 13 1.03333] [205 1 13 1.25]] [[120 8 3 0.0833333] [127 1 3 0.0833333]]]
Over here, this [[87 2 13 1.03333] [205 1 13 1.25]] shows all the trip data of one user, i.e. 2 trips. The next bracket encloses the trips for another user, i.e. [[120 8 3 0.0833333] [127 1 3 0.0833333]].
So I think essentially, I want all the rows in the array to be converted to a comma separated list, where each row is a list item.
Currently, the above data in MATLAB is in rows, i.e. for one user there are two rows and 4 columns. I want to make them look like above.
Could you kindly give me any hints/clues/tricks?
Thank you!
0 Comments
Sign in to comment.