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!

采纳的回答

Rik
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by