Version:

% $Date: 2009/03/24 08:32:09 $

% $Revision: 5.4 $

Part of Line 366 - line 375 needs to be modified.

z=diff(X); z0 = [];

if ~isempty(find(~(z-1))),z0(:,1)=find(~(z-1));else,z0(1:length(X))=0;end,

if ~isempty(find(~(z+1))),z1=find(~(z+1));else,z1(1:length(X))=0;end

z1 = z1(:); z0 = z0(:);

if z0(1)>z1(1)

z0(2:end+1,1)=z0(1:end);z0(1)=0;

end

if length(z0)>length(z1), z0(end)=[]; end

l=sort(z1-z0);

Bug description:

When z(1) is 1 or z(end) is 1, error occurs at line 375: l=sort(z1-z0);

Error message: ??? Error using ==> minus Matrix dimensions must agree.

Thanks!