Skip to content

Commit

Permalink
[@FOTF] Fixed lsim bug where delay value was > than step size.
Browse files Browse the repository at this point in the history
[GUI][fotfid] Several bugs fixed
[Identification] Added "state" parameter to fid_ function.
  • Loading branch information
extall committed Nov 16, 2016
1 parent 19022ca commit 26ae2b8
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 104 deletions.
11 changes: 8 additions & 3 deletions @fotf/lsim.m
Expand Up @@ -68,10 +68,15 @@
end

% Account for I/O delay
if (~isempty(G.ioDelay) && G.ioDelay ~= 0)
if (~isempty(G.ioDelay) && G.ioDelay > 0)
ii = find(t>G.ioDelay);
lz = zeros(ii(1)-1,1);
y = [lz; y(1:end-length(lz))];

% There is a possibility that the value of the sampling interval
% is greater or equal to the delay. In this case we disregard it.
if ~isempty(ii)
lz = zeros(ii(1)-1,1);
y = [lz; y(1:end-length(lz))];
end
end

if showPBar, delete(wBar); end
Expand Down

0 comments on commit 26ae2b8

Please sign in to comment.