How to convert a 1x2 cell with 500x2 timetable to a 1000x2 timetable
1 view (last 30 days)
Show older comments
I'm trying to convert a 1xn cell with 500x2 timetable in both cells to a (500xn)x2 timetable. So the timetable should be written among each other to one huge timetable.
n=2;
for i=1:n
imu = mpu6050(a,'SampleRate',50,'SamplesPerRead',500,'ReadMode','oldest') %, 'OutputFormat', 'matrix'
imu_read = read (imu)
Out {i} = imu_read;
end
for i=1:n
table{i}=Out {1, i}
end
Here is the first step, where i tried to get the timetables out of the cell array, but i still got an cell array.
Thanks in advance!
0 Comments
Accepted Answer
Rik
on 15 Jul 2022
I suspect this is what you need:
data_table=vertcat(Out{:});
You should probably avoid the variable name table, since that may cause problems with the data type.
2 Comments
Rik
on 15 Jul 2022
You're welcome. If I solved your issue, please consider marking my post as accepted answer. If not, feel free to comment with your remaining questions.
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!