To populate a timeseries object with data from a cell array where each cell contains a 4x19 double, you can indeed use a for loop. However, if you want a more MATLAB-esque solution (avoiding explicit loops), you can use arrayfun to achieve this. Here’s how you can do it:
% Initialize the timeseries object with an empty array of the correct size ts = timeseries(); % Use arrayfun to attach data to the timeseries object ts.Data = cat(3, data{:});