Sferle Alin-Tudor posted a question which may contain the answer to this question, earlier - 30 May 2021. Thanks, Sferle!
read multiple channels of different amounts of data into single matrix
2 ビュー (過去 30 日間)
古いコメントを表示
I have working code which reads different size data arrays from different files. Each array (matrix) originates from a different data "channel." Although there are differing amounts of data produced by each channel, each channel matrix has the same number of columns.
I want to combine all the data into a single array of data so it can be refernced by channel number. The resulting larger data matrix will thus have one additional column [compared to the channel data]; that column will be the channel index.
For example:
for ch = 1:10
chdata = ReadChData(ch);
% Add channel #ch data to larger matrix (DataMatrix) so that:
% chdata = DataMatrix(ch, ...)
% where the '...' would be replaced by the appropriate number of columns
end
I'm not sure how better to represent the general case so here's a specific example with 6 columns of data, for channel # nc:
chdata(:, :, :, :, :, :) = DataMatrix(nc, :, :, :, :, :, :)
(I do know or can determine the number of columns of data and it is consistent across channels. Each channel's data is read from a file in cell format and converted to a matrix, in case that makes a difference.)
5 件のコメント
採用された回答
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!