How to convert a 1x2 cell with 500x2 timetable to a 1000x2 timetable
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Rik
2022-7-15
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 个评论
Rik
2022-7-15
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Conversion 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!