[Solved] Extract certain numbers of samples from left to right given index point of a signal in Matlab
Here’s my suggestion to solve this issue: StartIdx = 3; EndIdx = 4; Idx = [2 19 23]; old_sig = [-2 0 1 2 5 6 7 8 10 19 20 21 22 23 24 25 26 27 28 29]; % Get number of “indices”. nIdx = numel(Idx); % Find actual indices. idx = ceil(find(repmat(old_sig, … Read more