I have a cell array in MATLAB that has the following columns..
Timestamp Info Joint X Y Z State
0.4449 'BASE05' 'SpineBase' -0.4222 -0.5245 2.681 'Tracked'
The 0.4449 needs to be converted to a timestamp format which I have so far been achieving by extracting column 1 and performing datestr on.
time = num(:,1);
time = num2cell(time);
Bodytime = datestr(cell2mat(time), 'HH:MM:SS');
This gives me a character array with all the timestamps.
However, I need to put this character array back into the first column of cell array. I'm having some trouble here, I was trying to convert my cell array to character array but as I have a mix of numbers and string I don't think that's the way forward. I also tried to replace the first column from the bodytime character array into my original cell array BodyData, but I don't think that's the way forward either.
Ideally I need to get something like this
Timestamp Info Joint X Y Z State
10:44:59 'BASE05' 'SpineBase' -0.4222 -0.5245 2.681 'Tracked'
My main goal here is to look up a certain timestamp of when an event happened and extract/plot (tbd) all the relative information for that time.
catthem together? I mean you can concatenate the column back to the front by doing something like [new_column,old_cell_array]; - GameOfThrows