Help with Following Error: Function 'subsindex' is not defined for values of class 'cell'.

7 Ansichten (letzte 30 Tage)
In my script I have the following lines of code:
PinputSeries = [TinputSeries(end-inputDelays+1:end),FinputSeries];
PtargetSeries = [TtargetSeries(end-inputDelays+1:end,con2seq(nan(1,N)))];
When I run the script, the first line assigning PinputSeries works fine but an error occurs when the second line is executed. The error is:
Function 'subsindex' is not defined for values of class 'cell'.
I have checked the Newsgroup and shopped around a little for a solution but can't seem to clear this up. Any thoughts would be greatly appreciated.
Best
Sam

Akzeptierte Antwort

Samuel Dickinson
Samuel Dickinson am 5 Feb. 2015
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

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by