Just change the assignment in your loop from
ts1{i} = timeseries(x{i},1:length(x{i}));
to
ts1(i) = timeseries(x{i},1:length(x{i}));
note the parentheses instead of curly braces.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!