FINDSEQ
Find sequences of repeated (adjacent/consecutive) numeric values. NaNs and Infs are supported.
Author: Oleg Komarov
Hello Oleg,
please have a look at the following bug:
a = [1, 1, 1; 2, 2, 3; 3, 4, 4];
findseq(a, 2)
ans =
1 1 5 2
2 2 7 3
4 6 9 2
The correct result would be:
ans =
1 1 7 3
2 2 5 2
4 6 9 2
A quick fix was to add the following code at line 144 (mainengine).
if dim == 2
[rows, ~] = ind2sub(size(IDX), FiPos);
FiPos = FiPos(rows);
end
I didn't check if I broke some functionality by adding this code, so please have a look at it yourself.
Nevertheless very helpful function.
Great tool. Helped a lot. But I found a little bug. Trying to convert something like:
a.b.Text = '';
b = struct2xml(a) throws an exception because of a bug in val2str(...).