I don't understand why I am getting this error.
1. This works…
onset_time_first = cell(ratio_channels,4);onset_time_first (:, 1) = cellfun(@(x,y,z)(cusum(x, climit, mshift, y, z)), beta_cell(:, 1), beta_cell (:, 2), beta_cell (:, 3), 'UniformOutput', false);
Here beta_cell is a 189×3 cell. This is repeated 3 more times.
2. This does not work…
onset_time_second = cell(ratio_channels,4);onset_time_second (:, 1) = cellfun(@(x)(findchangepts(x, 'Statistic', 'mean')), beta_cell_second);
Here beta_cell_second is a 189×1 cell. This is repeated 3 more times.
The syntax is identical but the first works and the second doesn't. It doesn't help to add "beta_cell_second(:))"
Best Answer