Skip to content
Snippets Groups Projects
Commit b5703a92 authored by marwan's avatar marwan
Browse files

bugfix if embedding exceeds data length

parent fee6224c
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,9 @@ function out=fnn(varargin)
% $Revision$
%
% $Log$
% Revision 5.5 2009/07/21 11:24:26 marwan
% missing default t
%
% Revision 5.4 2009/03/24 08:35:39 marwan
% copyright address updated
%
......@@ -215,6 +218,16 @@ N = length(x);
if isempty(maxM) | maxM > N/2, maxM = maxM_init; end
if isempty(t) | t > N/2 | t < 1, t = t_init; end
if maxM < 2, maxM = 2; end
if (maxM-1) * t > N - 5
maxM = maxM_init; t = 1;
warning('Embedding exceeds data length (m-1) * tau > N. Please check!')
h = findobj('Tag','delay');
if ~isempty(h)
set(h,'string',num2str(t))
end
end
if isempty(r), r = r_init; end
if isempty(s), s = s_init; end
if isempty(maxN)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment