Hi,
This is a lesson in not asking question before you've thoroughly checked the code. The issue I was having was that:
PtargetSeries = [TtargetSeries(end-inputDelays+1:end,con2seq(nan(1,N)))];
Should have read:
PtargetSeries = [TtargetSeries(end-inputDelays+1:end),con2seq(nan(1,N))];
The bracket after end corrected the issue.
Thanks
