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
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
David Horton
el 22 de Dic. de 2021
Comentada: David Horton
el 23 de Dic. de 2021
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 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Signal Radiation and Collection en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!