Rank: 452500 based on 0 downloads (last 30 days) and 0 file submitted
photo

Herbert Gsenger

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Herbert View all
Updated File Comments Rating
19 Mar 2012 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.

18 Sep 2011 struct2xml Convert a MATLAB structure into a XML file. Author: Wouter Falkena

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(...).

The simple solution is to replace

...
if (isempty(val))
%do nothing
...

by

if (isempty(val))
return;

in function val2str(...)

Contact us